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

Use session DB backend in manage.py to ease test #4912

Merged
merged 2 commits into from
Jan 15, 2016

Conversation

yakky
Copy link
Member

@yakky yakky commented Jan 13, 2016

cache backend is pretty frustrating for testing the cms using the integrated manage.py. This changes the session backend to db

@yakky yakky added this to the 3.2.1 milestone Jan 13, 2016
@yakky
Copy link
Member Author

yakky commented Jan 14, 2016

@mkoistinen @czpython what's your opinion?

@czpython
Copy link
Contributor

I don't think this would have side-effects so lgtm 👍

@yakky
Copy link
Member Author

yakky commented Jan 14, 2016

@czpython no effect when using an installed version of the CMS as manage.py it's not included

@yakky
Copy link
Member Author

yakky commented Jan 14, 2016

@ojii any reason for that setting in the first place? (performance during tests, maybe?)

@ojii
Copy link
Contributor

ojii commented Jan 14, 2016

Note: I currently don't have acces to a real dev env, so I'm working off GH/memory here

IIRC django-app-manage doesn't set SESSION_ENGINE. however, using cache instead of db generally results in faster session performance. can you elaborate on the "cache backend is pretty frustrating for testing"?

@ojii
Copy link
Contributor

ojii commented Jan 14, 2016

Oh, you mean why set it in manage.py in django CMS, not app-manage. Again, working in a somewhat suboptimal env right now, so please apologize. I think it's because it was always set to that and/or because cache backend will be faster (especially when testing postgres/mysql). I'm still curious as to what makes using db sessions easier for testing.

@mkoistinen
Copy link
Contributor

No opinion here. LGTM.

@yakky
Copy link
Member Author

yakky commented Jan 14, 2016

@ojii bad wording on my side. I meant that session cache backend is frustrating when manually testing (ie: using manage.py runserver from cms source root.
Coupled with locmem cache, it means you're logged out whenever runserver is reloaded.

@yakky
Copy link
Member Author

yakky commented Jan 14, 2016

@ojii @czpython @mkoistinen pushing a better approach

@ojii
Copy link
Contributor

ojii commented Jan 15, 2016

I meant that session cache backend is frustrating when manually testing (ie: using manage.py runserver from cms source root.
Coupled with locmem cache, it means you're logged out whenever runserver is reloaded.

okay that makes sense. the patch as it is now seems fine.

yakky added a commit that referenced this pull request Jan 15, 2016
Use session DB backend in manage.py to ease test
@yakky yakky merged commit 6cd9032 into django-cms:release/3.2.x Jan 15, 2016
@coveralls
Copy link

coveralls commented Feb 15, 2018

Coverage Status

Coverage increased (+0.07%) to 89.314% when pulling ce5ece1 on yakky:feature/session_db into f8201c9 on divio:release/3.2.x.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 89.295% when pulling cf3d16c on yakky:feature/session_db into f8201c9 on divio:release/3.2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants