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

general chicken-egg problem #33

Open
jedie opened this issue Jul 21, 2016 · 3 comments
Open

general chicken-egg problem #33

jedie opened this issue Jul 21, 2016 · 3 comments

Comments

@jedie
Copy link

jedie commented Jul 21, 2016

The DynamicSiteMiddleware will always raise 404 if he can't find the current Domain in the Alias model. But i can't login and use the admin panel, if i always get a 404...

Set MULTISITE_FALLBACK will not really help here.

So i have to deactivate DynamicSiteMiddleware, login and insert the current Domain and activate DynamicSiteMiddleware ?!?

jedie added a commit to jedie/PyLucid that referenced this issue Jul 21, 2016
@jedie
Copy link
Author

jedie commented Jul 21, 2016

I made a simple view to create a multisite.models.Alias entry for the current host with the default SITE_ID.

See: https://github.com/jedie/PyLucid/blob/7cd404f709a5e56846e064fbbe6a9578d2b93bb8/pylucid/multisite_views.py#L9-L28

I can contribute this via pull request.

@avoine
Copy link

avoine commented Jul 26, 2016

Similar problem here but I get into an infinite loop instead of a 404.

@mghughes
Copy link

mghughes commented Aug 3, 2016

Hey @jedie - to be fair you could manually add the domain from a python or db shell in that situation, but point taken :)

We'd welcome a PR for that view! I don't think we should neccessarily change the default fallback behaviour, but it could be useful to have that view around as an out-of-the-box option.

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

No branches or pull requests

3 participants