Questions tagged [django-sites]

django-sites is a framework for associating objects and functionality to particular Web sites. Is used when a single Django instance power more than one site.

django-sites is a framework for associating objects and functionality to particular Web sites. Is used when a single Django instance power more than one site.

119 questions
0
votes
1 answer

django.db.utils.ProgrammingError: relation "django_site" does not exist

Django 3.0.8 The database is newly created. No migrations so far. settings.py INSTALLED_APPS = [ 'django.contrib.sites', # DJANGO_APP. Necessary for the built in sitemap framework. ... ] SITE_ID = 1 # For the sites framework. urls.py from…
Michael
  • 4,273
  • 3
  • 40
  • 69
0
votes
2 answers

Django site matching query does not exist error

I installed allauth app, and once I try to go to my admin panel this error shows : DoesNotExist at /admin/login/ Site matching query does not exist. I know that it's configuration problem. Here is my settings.py file : """ Django settings for…
0
votes
1 answer

Configure one django app on seperate domain and rest on other and need to share data between apps

How can i configure a separate domain for one app and another domain rest of the apps. I tried using django sites, django-host. Please share the example
Arsh Doda
  • 294
  • 4
  • 14
0
votes
0 answers

Broken migrations with Django sites framework to restrict URLs access

I want to share single code-base Django (2.2) over 2 URLs : foo.domain.ltd & bar.domain.ltd. on foo.domain.ltd: all the Django URLs are available on bar.domain.ltd: only some URLs are available, all other return 403 error I expected using the…
freezed
  • 1,269
  • 1
  • 17
  • 34
0
votes
1 answer

How to configure Traefik to use Django Sites Framework

I'm testing cookiecutter-django in production using Docker-compose and Traefik with Let'sencrypt. I'm trying to configure it to work with 2 domains (mydomain1.com and mydomain2.com) using Django sites. How to configure Traefik so it could forward…
user10645868
0
votes
1 answer

Get site-specific user profile fields from user-created object

I am using Django sites framework (Django 2.1) to split an app into multiple sites. All of my models except the User model are site-specific. Here is my Post model: post.py class Post(models.Model): parent = models.ForeignKey( 'self', …
Jacob
  • 1,560
  • 4
  • 19
  • 41
0
votes
1 answer

Is Django sites framework suitable for serving sites with a different logic and models structure?

I am working on a application, which was written by other people. It actively uses the sites framework to serve two different gaming sites. These sites run on the same code, on the same database: class Entry(models.Model): headline =…
Ivan Virabyan
  • 1,666
  • 2
  • 19
  • 25
0
votes
1 answer

CurrentSiteManager via related model

Is it possible to use the CurrentSiteManager to check the site of a related object - not the site of the object itself? So, given the following models:- class A(models.Model): site = models.ForeignKey(Site) class B(models.Model): a =…
bodger
  • 1,112
  • 6
  • 24
0
votes
1 answer

Get objects from current site without settings.SITE_ID

I'm looking for the same functionality as the CurrentSiteManager provides but without having to specify SITE_ID in settings.py as the CurrentSiteManager requires. Information about the current site should come from the request. My take on the…
deni
  • 119
  • 1
  • 1
  • 11
0
votes
1 answer

Users for multiple sites in Django

I am trying to get multiple sites to use the same database and code but in a way which forces each user to have their own login to each site. I have seen a few suggestions as to how to make this work but I'm not sure which way to go. I am using the…
bodger
  • 1,112
  • 6
  • 24
0
votes
1 answer

1146 "app_name.django_site missing"

I am using Django 1.11 for making an app 'cnfs', and I am using MYSQL database with it. I am constantly facing this issue where I am getting an error like this when I type the following code: $python manage.py migrate System check identified some…
0
votes
1 answer

how to use single site for www and root in django sites framework

I currently have a single site, but I want to expand to several sites for use in django. I currently must have two entries in my django_sites table for my single site: 1 mysite.com My Site 2 www.mysite.com My Site Now that I want to have…
Atma
  • 29,141
  • 56
  • 198
  • 299
0
votes
0 answers

How to make a Permanent redirect to an internal ip address with apache in Ubuntu?

I have the following problem: I want to redirect any request received on the external ip lets say 192.168.x.x, to an internal ip of the same machine, lets say 172.0.0.1. The internal ip has been associated to a name editing the hosts file as…
0
votes
1 answer

Why template path is different and rendered content is different in mezzanine?

I have two free themes in mezzanine - solid & moderna taken from - HERE. I simply want to run the HOST_THEMES feature of mezzanine. So I went ahead and loaded both the themes in my INSTALLED_APPS like this - INSTALLED_APPS = ( "moderna", …
Nikhil Parmar
  • 876
  • 2
  • 11
  • 27
0
votes
1 answer

Django : Getting error while removing django.contrib.sites from INSTALLED_APPS

I want to remove django.contrib.sites from my django project. When I try to remove I am getting following error while starting the server: /usr/local/lib/python3.5/site-packages/django/db/models/fields/subclassing.py:22: RemovedInDjango110Warning:…
Dipak
  • 6,532
  • 8
  • 63
  • 87