Re: [Django] #21567: sites SITE_ID

2013-12-06 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  SITE_ID  |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by yakoub abaya ):

 i still believe that documentation is not sufficient .
 i don't expect it to explain what environment variables are, but at least
 add this line :
 "in order to serve multiple domains, then parallel multiple settings
 modules must be created .
 creating multiple settings can be achieved using DJANGO_SETTINGS_MODULE
 environment variable which is best set using mod_wsgi ."

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.daa9e8aa46d5b0131dc4f2e0165a20dd%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21567: sites SITE_ID

2013-12-06 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  SITE_ID  |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by aaugustin):

 * stage:  Unreviewed => Accepted


Comment:

 Depending on your Apache setup, SetEnvIf may or may not do the right
 thing. Sorry, this advice is rather unspecific, but you can find all the
 details in mod_wsgi's documentation.

 There's no "best way" in general, it all depends on your setup. However I
 can guarantee that you can do all you need in your application server's
 configuration, or at worst in the wsgi module (eg. if you're using Apache
 + mod_wsgi, rather than gunicorn or uwsgi).

 This is seriously turning into a support thread. The docs don't seem that
 bad to me. Of course, if you don't know what an environment variable is,
 you need to learn that first, but that's outside the scope of Django. The
 only concrete improvement I can imagine is to change the title "On the
 server (mod_wsgi)", because it's only relevant "if you're using mod_wsgi",
 not "on the server" in general.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.8592a975273f5978de22be39fbe5af83%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21567: sites SITE_ID

2013-12-06 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  SITE_ID  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by yakoub abaya ):

 or maybe the best way is to inherit from django WSGIHandler and define he
 environment variable inside __CALL__ method .

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.0996feff678de9733d47e266daf3bd6a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21567: sites SITE_ID

2013-12-06 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  SITE_ID  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by yakoub abaya ):

 i understand now what you mean :
 http://httpd.apache.org/docs/2.4/mod/mod_setenvif.html#setenvif
 or better using rewrite rules .

 but i suggest this information be added to documentation, referring
 developers to web server environment variables so they now where to begin
 .
 it is also important to mention the need for multiple settings modules
 since without them the sites framework won't work .

 in fact given that multiple settings modules are required, then this mean
 the sites framework can only serve a static predetermined domain
 configuration and do not scale if you intend to implement dynamic domains
 according to user preferences .

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.930eae95ea14ed628b2b1843338836eb%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21567: sites SITE_ID

2013-12-06 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  SITE_ID  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by yakoub abaya ):

 quote "and select the one to use with the DJANGO_SETTINGS_MODULE
 environment variable"
 at what stage and what method should this selection happen ?
 should i write middleware that checks response.HOST value and change that
 parameter accordingly ?

 and either case, why isn't this topic covered in documentation ?
 for example there is a special section that describes configuring apache
 wsgi to install django, so why doesn't that section describe how
 configuration wsgi can allow defining DJANGO_SETTINGS_MODULE parameter (if
 that is possible ..)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.1e813bc81f0e84550a06656f9c738bc8%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21567: sites SITE_ID

2013-12-05 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  SITE_ID  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 You create two python modules, like `my_project.settings_a` and
 `my_project.settings_b`, and select the one to use with the
 `DJANGO_SETTINGS_MODULE` environment variable, as documented here:
 https://docs.djangoproject.com/en/dev/topics/settings/#designating-the-
 settings

 Apache handles environment variable in a way I'm unable to describe and
 tends to bite beginners. That's why the docs suggest selecting the
 settings to use in the `wsgi` module when you're using Apache + mod_wsgi :
 https://docs.djangoproject.com/en/dev/topics/settings/#on-the-server-mod-
 wsgi — but that's really a workaround for a limitation of Apache, you
 simply set `DJANGO_SETTINGS_MODULE` on other application servers such as
 gunicorn or uwsgi.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.f34aa56c72a4e6ecb61201a49f50c6f7%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21567: sites SITE_ID

2013-12-05 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  SITE_ID  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by yakoub abaya ):

 but how is this done ?
 how can one project have several independent settings modules ?
 this information is crucial and doesn't appear in documentation or
 provided as a link to other article .
 even the comment you wrote is not understood from documentation, so your
 comment should appear in that documentation .

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.7e56c536fe4db4394d92843185d8e935%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21567: sites SITE_ID

2013-12-05 Thread Django
#21567: sites SITE_ID
-+-
 Reporter:  yakoub abaya |Owner:  nobody
     |   Status:  new
 Type:  Bug  |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  SITE_ID  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Generally speaking, the intent is to have two (or more) settings modules
 with a different value for `SITE_ID`. You could then use first one on 20
 servers and the second one on 10 other servers. This doesn't require a
 different wsgi module because the wsgi module takes the name of the
 settings module from the environment.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/091.a4de8205afd11686cede996fab4a9fc1%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #21567: sites SITE_ID

2013-12-05 Thread Django
#21567: sites SITE_ID
---+-
 Reporter:  yakoub abaya   |  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Documentation  |Version:  1.6
 Severity:  Normal |   Keywords:  SITE_ID
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+-
 the SITE_ID configuration is per settings.py .
 given the settings.py is unique per django project then this contradicts
 the whole purpose of sites framework to serve multiple domains using same
 django project .

 i found information elsewhere about defining multiple wsgi.py files for
 each domain .
 meaning in directory where django's default wsgi.py exist should have
 domain1_wsgi.py and domain2_wsgi.py
 and in http server configuration to define parallel wsgi instances per
 file .

 this information looks crucial for sites to actually server its purpose
 but it is not included in documentation, unless i somehow haven't
 understood how it is supposed to work .

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.db908a42a2a64b48be25273da11b4fc4%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.