-
Notifications
You must be signed in to change notification settings - Fork 14
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
'real' multisite support and other minor changes #14
base: master
Are you sure you want to change the base?
Conversation
Thank you. I'll try to review this one in a week. |
Thank you. |
I've updated the docs. Will update tests soon. |
Are you sure that tests working correctly? |
Cannot see anything wrong in Travis logs. |
cd sitemetrics/ && ./runtests.py Creating test database for alias 'default'... .....Ran 5 tests in 0.016s OK |
grep assertIn sitemetrics/tests.py self.assertIn('138500', render_string(tpl)) |
Can't reproduce on master, fails as expected. |
I've tried on clean venv and it is failed as expected. |
I'm sorry but I've failed to make test. |
Can't quite understand a use case you're to implement. Please reveal the code that didn't budge. |
I want to test SITE_BY_REQUEST conf option. |
Basically you can point |
Thnx. Will try soon. |
I've added empty urlpatterns because sitemetrics doesn't have any views, but django test client throws 404 because there is no any view under "/" pattern. |
Certainly. There seems nothing that could prevent you from making any number of test views and wiring those to urlpatterns. The other way is not to use test client at all and test our template node as is with various mock contexts. |
Ok, will try the second way |
Hi
In addition to default Django's site detection by SITE_ID from settings.py I want to add support of dynamic site detection mechanism. It is very usefull when you does not have separate settings.py per-site but want to serve multiple sites on single Django instance. In my case it is Mezzanine CMS which has native multisite without per-site settings support and I want to run django-sitemetrics same way.
This solution is not Mezzanine specific, it is pretty universal and disabled by default.
Changes: