Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes need to update to Django 2.2.x #739

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[[source]]
name = "pypi"
verify_ssl = true
url = "https://pypi.org/simple"

[packages]
anyjson = ">=0.3.3"
coverage = ">=4.0.3"
coveralls = ">=1.1"
Django = ">=2.0.7"
django-debug-toolbar = ">=1.9"
django-redis-cache = ">=1.7.0"
django-reversion = ">=2.0.6"
django-user_agents = ">=0.3.0"
docopt = ">=0.6.2"
feedparser = ">=5.2.1"
geojson = "~=1.3"
isodate = ">=0.5.4"
jsonfield = ">=1.0.3"
lxml = ">=3.8"
mysolr = "==0.8.3"
numpy = ">=1.11.0"
pandas = ">=0.22.0"
"psycopg2" = "==2.7.5"
pyparsing = "==2.1.1"
python-dateutil = "==2.5.3"
pytz = "==2016.4"
rdflib = "==4.2.1"
rdflib-jsonld = "==0.4.0"
redis = ">=2.10.5"
requests = ">=2.20.0"
roman = "==2.0.0"
scipy = ">=0.17.0"
six = "==1.10.0"
sqlparse = ">=0.2.4"
titlecase = "==0.9.0"
ua-parser = ">=0.7.1"
user-agents = ">=1.0.1"
python-memcached = ">=1.59"
pyproj = ">=1.9.5"
atomicwrites = "==1.2.1"
attrs = "==18.2.0"
more-itertools = "==4.3.0"
"pathlib2" = "==2.3.2"
pluggy = "==0.8.0"
py = "==1.7.0"
pytest = "==3.9.3"
pytest-django = "==3.4.3"
Pillow = "==5.2.0"
PyYAML = ">=3.11"
Shapely = "==1.5.15"
Unidecode = "==0.4.19"
uWSGI = "==2.0.17.1"

[dev-packages]

[requires]
python_version = "3.7"
585 changes: 585 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion opencontext_py/apps/edit/versioning/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
class VersionMetadata(models.Model):

# There must be a relationship with Revision called `revision`.
revision = models.ForeignKey(Revision, null=True) # allow nulls so as to record deletes also
revision = models.ForeignKey(Revision, on_delete=models.CASCADE,
null=True) # allow nulls so as to record deletes also
project_uuid = models.CharField(max_length=50, db_index=True)
uuid = models.CharField(max_length=200, db_index=True, null=True)
item_type = models.CharField(max_length=50, null=True)
Expand Down
2 changes: 1 addition & 1 deletion opencontext_py/apps/ocitems/projects/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def view_allowed(self, request):
def edit_allowed(self, request):
""" Checks to see if a user is allowed to edit a project """
output = False
if request.user.is_authenticated():
if request.user.is_authenticated:
if request.user.is_superuser:
# super users are super!
output = True
Expand Down
2 changes: 1 addition & 1 deletion opencontext_py/libs/requestnegotiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def anonymize_request(self, request):
""" anonymizes a request by flushing session cookies for users
that are not logged in
"""
if not request.user.is_authenticated():
if not request.user.is_authenticated:
# the user is not authenticated, therefore
# we will default to expire the session cookie for a user after the default
pass
Expand Down
2 changes: 1 addition & 1 deletion opencontext_py/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def get_secret(setting, secrets=secrets):
'django_user_agents',
)

MIDDLEWARE_CLASSES = (
MIDDLEWARE = (
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand Down
2 changes: 1 addition & 1 deletion opencontext_py/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
# Index, home-page route
url(r'^$', HomeViews.index, name='home_index'),
# Admin route
url(r'^admin/', include(admin.site.urls))]
url(r'^admin/', admin.site.urls)]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
if settings.DEBUG:
import debug_toolbar
Expand Down
107 changes: 39 additions & 68 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,81 +1,52 @@
-i https://pypi.org/simple
anyjson==0.3.3

coverage==4.0.3

coveralls==1.1

Django==1.11.21

django-debug-toolbar==1.8

django-redis-cache==1.7.0

django-reversion==2.0.6

django-user-agents==0.3.0

atomicwrites==1.2.1
attrs==18.2.0
certifi==2019.6.16
chardet==3.0.4
coverage==4.5.3
coveralls==1.8.1
django-debug-toolbar==2.0
django-redis-cache==2.0.0
django-reversion==3.0.4
django-user-agents==0.4.0
django==2.2.2
docopt==0.6.2

feedparser==5.2.1

geojson==1.3.2

isodate==0.5.4

jsonfield==1.0.3

lxml==3.6.0

geojson==1.3.5
idna==2.8
isodate==0.6.0
jsonfield==2.0.2
lxml==4.3.4
more-itertools==4.3.0
mysolr==0.8.3

numpy==1.11.0

pandas>=0.22.0

Pillow==5.2.0

psycopg2==2.6.1

numpy==1.16.4
pandas==0.22.0
pathlib2==2.3.2
pillow==5.2.0
pluggy==0.8.0
psycopg2==2.7.5
py==1.7.0
pyparsing==2.1.1

pyproj==2.2.1
pytest-django==3.4.3

pytest==3.9.3

python-dateutil==2.5.3

python-memcached==1.59
pytz==2016.4

PyYAML==4.2b1

rdflib==4.2.1

pyyaml==5.1.1
rdflib-jsonld==0.4.0

redis==2.10.5

requests==2.20.0

rdflib==4.2.1
redis==3.2.1
requests==2.22.0
roman==2.0.0

scipy==0.17.0

Shapely==1.5.15

scipy==1.3.0
shapely==1.5.15
six==1.10.0

sqlparse==0.2.4

sqlparse==0.3.0
titlecase==0.9.0

ua-parser==0.7.1

Unidecode==0.4.19

user-agents==1.0.1

uWSGI==2.0.12

python-memcached==1.59

pyproj==1.9.5
ua-parser==0.8.0
unidecode==0.4.19
urllib3==1.25.3
user-agents==2.0
uwsgi==2.0.17.1