The login cookie isn’t being set correctly, because the domain of the cookie sent out by Django doesn’t match the domain in your browser. Try these two things:
If you’re sure your username and password are correct, make sure your user account has is_active and is_staff set to True. The admin site only allows access to users with those two fields both set to True.
Set the CACHE_MIDDLEWARE_ANONYMOUS_ONLY setting to True. See the cache documentation for more information.
At this point, Django doesn’t have an official way to do this. But it’s an oft-requested feature, so we’re discussing how it can be implemented. The problem is we don’t want to couple the model layer with the admin layer with the request layer (to get the current user). It’s a tricky problem.
One person hacked up a solution that doesn’t require patching Django, but note that it’s an unofficial solution, and there’s no guarantee it won’t break at some point.
See the answer to the previous question.
See serving the admin files in the “How to use Django with mod_python” documentation.
Django won’t bother displaying the filter for a ManyToManyField if there are fewer than two related objects.
For example, if your list_filter includes sites, and there’s only one site in your database, it won’t display a “Site” filter. In that case, filtering by site would be meaningless.
You’ve got several options. If you want to piggyback on top of an add/change form that Django automatically generates, you can attach arbitrary JavaScript modules to the page via the model’s class Admin js parameter. That parameter is a list of URLs, as strings, pointing to JavaScript modules that will be included within the admin form via a <script> tag.
If you want more flexibility than simply tweaking the auto-generated forms, feel free to write custom views for the admin. The admin is powered by Django itself, and you can write custom views that hook into the authentication system, check permissions and do whatever else they need to do.
If you want to customize the look-and-feel of the admin interface, read the next question.
We like it, but if you don’t agree, you can modify the admin site’s presentation by editing the CSS stylesheet and/or associated image files. The site is built using semantic HTML and plenty of CSS hooks, so any changes you’d like to make should be possible by editing the stylesheet. We’ve got a guide to the CSS used in the admin to get you started.
May 15, 2009