Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango caching for subdomains
    primarykey
    data
    text
    <p>I'm using <strong>subdomains</strong> in django for user pages via a <strong>middleware hack</strong> in a similar way to what is described <a href="https://stackoverflow.com/questions/624827/in-a-django-web-application-how-do-you-give-users-their-own-subdomain">here</a>:</p> <p>Now, I have the default django cache turned on for all pages for not-logged-in users. I had to <strong>disable the cache implicitly for user pages</strong> as it treated those pages just as if they were the / pages, e.g. filmaster.com and michuk.filmaster.com is the same page to django.</p> <p>Do you know of any nice and easy way to force django to understand subdomains for caching? Or do you suggest I just cache each of the subdomain views explicitly?</p> <p><strong>Update</strong>: actually looked into that <a href="https://stackoverflow.com/questions/624827/in-a-django-web-application-how-do-you-give-users-their-own-subdomain">solution</a> and it's not exactly how we do it. We do not redirect. We want the url to stay in subdomain, so what we do is just call the views directly from the middleware. </p> <p>You can see the details of the hacky implementation here: musielak.eu/public/film20/film20/core/middleware.py [<strong>Update:404 page not found</strong>] (user: justlookingaround, pass:film@ster -- yes, we're open source). And here is a jira for fixing the hack: jira.filmaster.org/browse/FLM-54 (but that's not entirely relevant to the problem - it's just to make sure you don't think we support crappy coding :P)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload