-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Command for migrating existing sessions to the new session store #33
Conversation
Hi @ivorbosloper, thanks for your contribution. Could you also write a small explanation of this command in the documentation, for helping other users making the switch? Furthermore, the coverage would decrease to 85% after merging ☔. Would it be feasible to also provide a simple unit test? Otherwise I could write one, but might take a while to find the free time required. |
Hi @ivorbosloper, thanks again for your contribution. Would it be feasible to also provide a unit test anywhere in the near future? Without a validation of the contribution I cannot merge this pull request. |
24a9830
to
0018b5f
Compare
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
==========================================
- Coverage 93.75% 93.32% -0.43%
==========================================
Files 14 15 +1
Lines 608 659 +51
Branches 31 35 +4
==========================================
+ Hits 570 615 +45
- Misses 30 34 +4
- Partials 8 10 +2
Continue to review full report at Codecov.
|
91d02ed
to
b745418
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR and great to see there's a test for it as well. If you could resolve the two comments, then I'd be happy to merge this!
@@ -98,7 +98,7 @@ def location(value): | |||
""" | |||
try: | |||
location = geoip() and geoip().city(value) | |||
except: | |||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable isn't used, no need to assign it.
.gitignore
Outdated
@@ -10,3 +10,5 @@ | |||
|
|||
/docs/_build/ | |||
/GeoLite2-City.mmdb | |||
.idea/ | |||
*.pyc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for adding these ignores, I prefer to have these in my global gitignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid points, I've improved the pull-request...
Thank you, I've merged the PR! 👍 |
When converting an in-production site from
django.contrib.sessions
todjango-user-sessions
thispython manage.py sessions_to_usersessions.py
command allows you to maintain existing sessions (keep already logged-in users logged-in) and make the transition smooth.