Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-05-30 Thread BrettH
-1. The only issue that I have with sites is that the default site should be 127.0.0.1:8000 since that's what runserver defaults to. Putting example.com as SITE_ID 1 only makes novice django developers shout and throw things because like me they 'add 127.0.0.1:8000 and delete example.com' instead

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-05-23 Thread Rolando Espinoza La Fuente
On Tue, May 18, 2010 at 11:14 AM, Felipe Prenholato wrote: > About idea of use settings.py to set a default site, -1 > About ask to user what is yours default site, +1 > This thing only runs at syncdb, so I really don't think that a entry in > settings.py is needed. This seems a controversial top

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-05-18 Thread Felipe Prenholato
About idea of use settings.py to set a default site, -1 About ask to user what is yours default site, +1 This thing only runs at syncdb, so I really don't think that a entry in settings.py is needed. 2010/5/18 Oldřich Jedlička > Hi, > > 2010/3/19 dalore > > Because of this thread I decided to

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-05-18 Thread Oldřich Jedlička
Hi, 2010/3/19 dalore > Because of this thread I decided to release a little app we have been > using internally. It's a straightforward way to modify the default > site object. > > More details: http://oppian.com/labs/django-defaultsite/ > > Any comments/suggestions welcome. > I've just got to

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-19 Thread dalore
Because of this thread I decided to release a little app we have been using internally. It's a straightforward way to modify the default site object. More details: http://oppian.com/labs/django-defaultsite/ Any comments/suggestions welcome. Sincerely Matthew Jacobi Oppian Systems Ltd On Mar 12,

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-17 Thread Chris
On Mar 15, 10:44 am, Yuri Baburov wrote: > Hello all, > > How do you like the following idea: > startproject command puts a fixture for django.contrib.sites (and > fixture for superuser probably) to the root folder or whatever, to be > loaded with syncdb? > That way also encourage users to get mor

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-15 Thread Gert Van Gool
There is a ticket for something similar #8896 (http://code.djangoproject.com/ticket/8896). Let urlresolvers also route according to hostname. -- Gert Mobile: +32 498725202 Web: http://gert.selentic.net 2010/3/15 jens : > On Mar 15, 3:44 pm, Yuri Baburov wrote: >> How do you like the following

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-15 Thread jens
On Mar 15, 3:44 pm, Yuri Baburov wrote: > How do you like the following idea: > startproject command puts a fixture for django.contrib.sites (and > fixture for superuser probably) to the root folder or whatever, to be > loaded with syncdb? IMHO it would be a great, if django can set the SITE_ID d

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-14 Thread subs...@gmail.com
I guess at some point its just feature-clut. Its a use case we _could_ encompass, but would you really even find yourself using it? I don't see the technical difference here--pre-syncdb, you either have to 'wade' to the database or you have to 'wade' to this item in settings.py. Its not as though

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-14 Thread aditya
Fair enough. As Gabriel pointed out earlier, I didn't realize that I could change those values by adding django.contrib.sites to my INSTALLED_APPS. That's why I said there was no straightforward way of configuring those values. I wish Django had some sort of 'sample proposals' on their site. You s

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-14 Thread Rajeev J Sebastian
On Sun, Mar 14, 2010 at 12:58 PM, Gabriel Hurley wrote: > I'm not arguing that the proposal is inherently bad, just that it was > being proposed without understanding the existing solution. > Personally, I use a custom model that inherits from Site to manage my > sites, so it's not like I'm thrill

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-14 Thread Rajeev J Sebastian
On Sun, Mar 14, 2010 at 12:58 PM, Gabriel Hurley wrote: > I'm not arguing that the proposal is inherently bad, just that it was > being proposed without understanding the existing solution. That's not what I got from your harsh responses. The existing "solution" is to modify the default Site cre

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-13 Thread Gabriel Hurley
I'm not arguing that the proposal is inherently bad, just that it was being proposed without understanding the existing solution. Personally, I use a custom model that inherits from Site to manage my sites, so it's not like I'm thrilled with the current system either. I would actually be +0 on add

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-13 Thread aditya
A fixture won't really solve the problem. I'm okay with Gabriel's solution though. It is not as simple as my proposal, but certainly more elegant. Aditya On Mar 13, 6:57 am, Chuck Harmston wrote: > This particular use case (having predefined sets of information loaded into > the database on eith

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-13 Thread Rajeev J Sebastian
On Sat, Mar 13, 2010 at 6:27 PM, Chuck Harmston wrote: > This particular use case (having predefined sets of information loaded into > the database on either syncdb or other command) is what Django's fixture > loading/creation system is for. > http://docs.djangoproject.com/en/dev/ref/django-admin/

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-13 Thread Will Hardy
> Does this proposal add any functionality that fixtures do not already > provide? Convenience. It moves the definition of the site away from the database, and away from fixtures files and into the settings. Personally, I am yet to need multiple sites for a single database, and would much prefer b

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-13 Thread Chuck Harmston
This particular use case (having predefined sets of information loaded into the database on either syncdb or other command) is what Django's fixture loading/creation system is for. http://docs.djangoproject.com/en/dev/ref/django-admin/#what-s-a-fixture http://docs.djangoproject.com/en/dev/howto/in

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-13 Thread Rajeev J Sebastian
On Sat, Mar 13, 2010 at 3:56 PM, Gabriel Hurley wrote: > "domain = Site.objects.get_current().domain" > > The "Site" model in that code comes from the > django.contrib.sites.models, part of the Sites framework I mentioned > above. This is not some bizarre buried database mishap; this is the > app

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-13 Thread Gabriel Hurley
"domain = Site.objects.get_current().domain" The "Site" model in that code comes from the django.contrib.sites.models, part of the Sites framework I mentioned above. This is not some bizarre buried database mishap; this is the app developer taking advantage of a contrib app that is included in Dja

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-12 Thread aditya
Could you be more specific? I'm not sure what you mean. Aditya On Mar 12, 5:26 pm, Gabriel Hurley wrote: > You seem to be missing the point of the code you reference above. You > should probably read up on the "Sites" framework that ships with > Django: > > http://docs.djangoproject.com/en/dev/re

Re: Adding optional SITE_DOMAIN and SITE_NAME variables in settings.py

2010-03-12 Thread Gabriel Hurley
You seem to be missing the point of the code you reference above. You should probably read up on the "Sites" framework that ships with Django: http://docs.djangoproject.com/en/dev/ref/contrib/sites/ All the best, - Gabriel On Mar 12, 1:39 pm, aditya wrote: > Description > = > This