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
1
vote
1 answer

Django Sites + ALLOWED_HOSTS

I'm implementing a django multi-site portal. I'm probing it and I get an "Invalid HTTP_HOST header" exception when I try to access a site domain that I have register in Sites model. Is it necessary to set the url in settings.ALLOWED_HOSTS too?
paralosreg
  • 141
  • 1
  • 15
1
vote
2 answers

link django user to perticular site in site framework

I've setup Django sites framework in my project, actually, i want to combine Django user to that particular site What I want to achieve is that when user register from particular site or subsite which register with site framework then that user has…
Jigar Tarpara
  • 59
  • 1
  • 10
1
vote
2 answers

Django Sites framework - can I do these things?

I have a general idea of what the Sites framework is, but after much researching, I can't confirm if what I'm trying to achieve is possible. Here's what I want to achieve (simplified). These would be three separate sites - and separate Django…
Garfonzo
  • 3,876
  • 6
  • 43
  • 78
1
vote
1 answer

How do I change my weblate site url

I installed my own weblate server somewhere, then I switched my nginx configuration to a domain name. I went into weblate's django admin, in sites section and updated the site entry to point to the right location. I couldn't find anything related to…
GabLeRoux
  • 16,715
  • 16
  • 63
  • 81
1
vote
1 answer

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…
Zac Bowling
  • 6,508
  • 1
  • 27
  • 26
1
vote
1 answer

PyCharm Django test runner can't see django.sites (Runtime Error)

When I run manage.py test everything is working normally, but if run test with PyCharm Django Tests it gives me following error: Error Traceback (most recent call last): File "/usr/lib/python3.4/unittest/case.py", line 58, in testPartExecutor …
Anton Linevych
  • 647
  • 1
  • 7
  • 25
1
vote
0 answers

Unique username with django sites framework

I have created multiple sites, that has user identification like here: How to get unique users across multiple Django sites powered by the "sites" framework? But, how to make user unique for every website where he registered ? For example: Arti at…
Arti
  • 7,356
  • 12
  • 57
  • 122
1
vote
1 answer

one django project - render different content depending on domain

I seem to be using django's site framework. :) BUT. here what I dont understand: How to write dynamic views to check current domain and render proper content to that domain what I did is: (I have one single django project with single…
doniyor
  • 36,596
  • 57
  • 175
  • 260
1
vote
1 answer

django sites default

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…
Valentin Golev
  • 9,965
  • 10
  • 60
  • 84
1
vote
1 answer

call a method in Django admin site

i have a Django project and right now everything works fine. i have a Django admin site and now, i want that when i add a new record to my model, a function calls simultaneously and a process starts. how i can do this? what is this actions name?
Fcoder
  • 9,066
  • 17
  • 63
  • 100
1
vote
1 answer

Separate Git repository for multiple Django sites

I am using Django as development framework for my current Project (say Project A). I want to create a new application (say Project B) that has different views as Project A. But this new Project B is going to use most of the existing backend modules…
lalit
  • 3,283
  • 2
  • 19
  • 26
1
vote
1 answer

Single sign on multiple django sites

I am working in a django development with 3 sites (siteA, siteB, siteC) under single django code base, where every site have his own domain and own database. Because of the separate databases i have separate users for each site. My question is:…
Adam
  • 173
  • 1
  • 3
  • 11
1
vote
1 answer

Is there a less-database-intensive way to get data from my extended Django Site model?

I run a site that operates the same on many URLs except for the name and the display of objects tied to a given site. Because of this I have extended the Site model to include various other bits of information about a site and created a middleware…
Bryson
  • 1,186
  • 2
  • 13
  • 26
0
votes
1 answer

django + wsgi + multiple sites

I have a django-app using sites framework and need to deploy in a single apache virtual host. I was using mod-python with PythonInterpreter and it was working fine. But mod-python is deprecated and I want to migrate to wsgi. But I can figure out how…
msbrogli
  • 483
  • 3
  • 11
0
votes
2 answers

Serving multiple django-sites on the same domain /es /en /pt

Is it posible to serve an app in two diferent sites, on the same domain? These are the requisites of waht i'm trying to: Server the same app in to diferente languages The URL would be something like: www.domain.com/es …
sandok
  • 53
  • 7