django-sites

How can I get the Django admin's "View on site" link to work?

I've been working with a Django app for a while, and the Django admin interface works great, except that the "View on site" link doesn't work. Whenever I try to use it, I get an OperationalError with the message: no such table: django_site. I've done some research into this problem, and it seems that I have to set up the Django sites fra...

How to get unique users across multiple Django sites powered by the "sites" framework?

I am building a Django site framework which will power several independent sites, all using the same apps but with their own templates. I plan to accomplish this by using multiple settings-files and setting a unique SITE_ID for them, like suggested in the Django docs for the django.contrib.sites framework However, I don't want a user f...

How to locally test Django's Sites Framework

Django has the sites framework to support multiple web site hosting from a single Django installation. EDIT (below is an incorrect assumption of the system) I understand that middleware sets the settings.SITE_ID value based on a lookup/cache of the request domain. ENDEDIT But when testing locally, I'm at http://127.0.0.1:8000/,...

django sites default

Hello! Many 'reusable apps' require django-sites. There is annoying field "publish on" in admin interface, which I can't exclude because it has no default parameter (so the entry will be published nowhere. I tried). The model is described in the 'reusable app' so I don't want to change it. How can I get rid of this annoying field? ...

Automatically prompt to update default site domain name when running Django’s ./manage.py syncdb?

Regarding Django Sites module and manage.py syncdb The Auth module can prompt to ask for default superuser for the admin site, during .\manage.py syncdb. I would like to see similar things happen for the default site domain name. Currently it is example.com, hardcoded unless I use admin web site to change it. I want to change it during ...

One admin for multiple sites

I have two sites with different SITE_IDs, but I want to have only one admin interface for both sites. I have a model, which is just an extended FlatPage: # models.py class SFlatPage(FlatPage): currobjects = CurrentSiteManager('sites') galleries = models.ManyToManyField(Gallery) # etc # admin.py class SFlatPageAdmin(FlatPa...

django cross-site reverse a url

I have a similar question than django cross-site reverse. But i think I can't apply the same solution. I'm creating an app that lets the users create their own site. After completing the signup form the user should be redirected to his site's new post form. Something along this lines: new_post_url = 'http://%s.domain:9292/mana...

Safe to modify settings.SITE_ID from middleware in Django?

I have modified the multihost.py middleware I found at http://effbot.org/zone/django-multihost.htm to set the settings.SITE_ID dynamically, but have some concerns that I may have just left the reservation. Most examples I have found for multiple domain hosting have been setup with multiple settings.py files hardcoded to their respective...

Use Django flatpages without sites

Is there any that I can have a catch all site with flatpage framework in Django? I have one site but you can get to it through a few DNS names that change constantly. I need to map these all to a single site and flatpages seems bent on me pre-specifying my domain entries. ...

Django current site site domain sitemap

How do I get my sites landing page to appear in the sitemap.xml ? I know you can add the other ones by means of djangos sitemap contrib. ...