-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing support for Django 4, dropping support for Django 1 and 2 …
- Loading branch information
Showing
7 changed files
with
54 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
#from django.conf.urls import patterns, include, url | ||
from django import VERSION | ||
if VERSION[0] > 1 or VERSION[1] >= 8: #Django 1.8 and higher | ||
from django.conf.urls import url, include | ||
elif VERSION[1] >= 6: #Django 1.6 | ||
from django.conf.urls import patterns, url, include | ||
else: | ||
from django.conf.urls.defaults import * | ||
from django.urls import re_path, include | ||
|
||
import flat.modes.editor.views | ||
|
||
urlpatterns = [ | ||
# Examples: | ||
url(r'^pub/(?P<configuration>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.editor.views.pub_view, name='view'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/history/?$', flat.modes.editor.views.history, name='history'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/revert/(?P<commithash>[a-f0-9]*)/?$', flat.modes.editor.views.revert, name='revert'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/save/?$', flat.modes.editor.views.save, name='save'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.editor.views.view, name='view'), | ||
re_path(r'^pub/(?P<configuration>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.editor.views.pub_view, name='view'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/history/?$', flat.modes.editor.views.history, name='history'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/revert/(?P<commithash>[a-f0-9]*)/?$', flat.modes.editor.views.revert, name='revert'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/save/?$', flat.modes.editor.views.save, name='save'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.editor.views.view, name='view'), | ||
|
||
#redeclare viewer stuff: (why?) | ||
url(r'^pub/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.pub_poll, name='poll'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.poll, name='poll'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/query/?$', flat.modes.viewer.views.query, name='query'), | ||
#url(r'^(?P<namespace>[\w\d\-_\./]+)/(?P<docid>[\w\d\-_\.]+)/(?P<elementid>[\w\d\-_\.]+)/?$', 'flat.modes.viewer.views.subview', name='subview'), | ||
re_path(r'^pub/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.pub_poll, name='poll'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.poll, name='poll'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/query/?$', flat.modes.viewer.views.query, name='query'), | ||
#re_path(r'^(?P<namespace>[\w\d\-_\./]+)/(?P<docid>[\w\d\-_\.]+)/(?P<elementid>[\w\d\-_\.]+)/?$', 'flat.modes.viewer.views.subview', name='subview'), | ||
] | ||
|
||
if VERSION[0] == 1 and VERSION[1] < 8: #Django <1.8 | ||
urlpatterns = patterns('',*urlpatterns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
#from django.conf.urls import patterns, include, url | ||
from django import VERSION | ||
if VERSION[0] > 1 or VERSION[1] >= 8: #Django 1.8 and higher | ||
from django.conf.urls import url, include | ||
elif VERSION[1] >= 6: #Django 1.6 | ||
from django.conf.urls import patterns, url, include | ||
else: | ||
from django.conf.urls.defaults import * | ||
from django.urls import re_path, include | ||
|
||
import flat.modes.metadata.views | ||
|
||
urlpatterns = [ | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.metadata.views.view, name='view'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.metadata.views.view, name='view'), | ||
] | ||
|
||
if VERSION[0] == 1 and VERSION[1] < 8: #Django <1.8 | ||
urlpatterns = patterns('',*urlpatterns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
#from django.conf.urls import patterns, include, url | ||
from django import VERSION | ||
if VERSION[0] > 1 or VERSION[1] >= 8: #Django 1.8 and higher | ||
from django.conf.urls import url, include | ||
elif VERSION[1] >= 6: #Django 1.6 | ||
from django.conf.urls import patterns, url, include | ||
else: | ||
from django.conf.urls.defaults import * | ||
from django.urls import re_path, include | ||
|
||
import flat.modes.structureeditor.views | ||
|
||
urlpatterns = [ | ||
# Examples: | ||
url(r'^(?P<namespace>[\w\-_\.@]+)/(?P<docid>[\w\-\.]+)/?$', flat.modes.structureeditor.views.view, name='view'), | ||
#url(r'^(?P<namespace>[\w\-\.]+)/(?P<docid>[\w\-\.]+)/annotate/?$', 'flat.modes.structureeditor.views.annotate', name='annotate'), | ||
re_path(r'^(?P<namespace>[\w\-_\.@]+)/(?P<docid>[\w\-\.]+)/?$', flat.modes.structureeditor.views.view, name='view'), | ||
#re_path(r'^(?P<namespace>[\w\-\.]+)/(?P<docid>[\w\-\.]+)/annotate/?$', 'flat.modes.structureeditor.views.annotate', name='annotate'), | ||
] | ||
|
||
if VERSION[0] == 1 and VERSION[1] < 8: #Django <1.8 | ||
urlpatterns = patterns('',*urlpatterns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
#from django.conf.urls import patterns, include, url | ||
from django import VERSION | ||
if VERSION[0] > 1 or VERSION[1] >= 8: #Django 1.8 and higher | ||
from django.conf.urls import url, include | ||
elif VERSION[1] >= 6: #Django 1.6 | ||
from django.conf.urls import patterns, url, include | ||
else: | ||
from django.conf.urls.defaults import * | ||
from django.urls import re_path, include | ||
|
||
import flat.modes.viewer.views | ||
|
||
urlpatterns = [ | ||
# Examples: | ||
url(r'^pub/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.pub_poll, name='poll'), | ||
url(r'^pub/(?P<configuration>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.viewer.views.pub_view, name='view'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.poll, name='poll'), | ||
url(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.viewer.views.view, name='view'), | ||
re_path(r'^pub/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.pub_poll, name='poll'), | ||
re_path(r'^pub/(?P<configuration>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.viewer.views.pub_view, name='view'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/poll/?$', flat.modes.viewer.views.poll, name='poll'), | ||
re_path(r'^(?P<namespace>[\w\d\-_\./@]+)/(?P<docid>[\w\d\-_\.]+)/?$', flat.modes.viewer.views.view, name='view'), | ||
] | ||
|
||
if VERSION[0] == 1 and VERSION[1] < 8: #Django <1.8 | ||
urlpatterns = patterns('',*urlpatterns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
folia >= 2.5.4 | ||
foliadocserve >= 0.7.6 | ||
Django>=1.8.13 | ||
Django>=3.0 | ||
requests | ||
mozilla_django_oidc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters