Re: Versioning an app and displaying in template

2011-04-02 Thread Aryeh Leib Taurog
On Apr 2, 1:42 am, "christian.posta" wrote: > I would like to get some feedback on how others display the version of > their apps to the users of the app. > > I tag each build/version of the app in SVN when I deploy to my > clients, but i'm trying to figure out a good way to report that tag > name

Re: validate_unique not checking parents of parents' fields?

2011-04-02 Thread Bryan
Ah perfect thanks! I looked to see if something had been submitted, but couldn't find it. On Apr 2, 3:26 pm, Karen Tracey wrote: > On Sat, Apr 2, 2011 at 4:37 PM, Bryan wrote: > > Is this a bug? > > Yes:http://code.djangoproject.com/ticket/15321 > > Karen > --http://tracey.org/kmt/ -- You rece

Re: Hi, I'm trying to reset my db (using multiple dbs) but flush and reset don't seem to drop the tables.

2011-04-02 Thread jd
well, I ended up doing a sqlreset and dbshell and pasting it in there. That worked but it seemed like maybe a bug so I posted it. Cheers! On Apr 2, 5:21 pm, jd wrote: > I've tried > > >python manage.py flush    --database 'retail' > > ...and then changed the model a little. > > syncdb gives no o

Re: Read write config from a file. How?

2011-04-02 Thread hollando
Yes. Thanks for your replies. I have one more question. I want to put all my configures into one file and pass the file name by command line. My django is deployed as in uwsgi, so I pass the command line by -- pyargv '-c /etc/myconfig.ini'. In django, how can I retrieve this command line file name

Re: Read write config from a file. How?

2011-04-02 Thread Addy Yeow
Take a look at http://docs.python.org/library/configparser.html On Sun, Apr 3, 2011 at 4:45 AM, Swordfish wrote: > Hi! is your file in 'ini' format or simply in 'py'? > > Regards, > Eugeny > > 02.04.11, 10:34, "hollando" : > >> Hi, some of my config store in a file not in settings.py. Are there >

Hi, I'm trying to reset my db (using multiple dbs) but flush and reset don't seem to drop the tables.

2011-04-02 Thread jd
I've tried >python manage.py flush--database 'retail' ...and then changed the model a little. syncdb gives no output about table creation afterwards, and objects that were in the db remain after the flush. also tried ... >python manage.py reset retail_store --database 'retail' same thin

Re: How to create django custom login page?

2011-04-02 Thread Andre Terra
For the sake of clarity and future reference, let me suggest another approach that will suffice for some use cases. Sometimes your need can be solved simply by extending upon the original login page, without rewriting anything. For example, if you would like to take e-mails rather than usernames (

Re: How to create django custom login page?

2011-04-02 Thread Vjacheslav
I suggest you to use django.contrib.auth app as your starting point: 1. Form: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/forms.py#L61 2. View http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/views.py#L24 3. Template http://code.djangoproject.com/

Re: How to create django custom login page?

2011-04-02 Thread Vjacheslav
I suggest you to start from learning django.contrib.auth app sources. Using them as your starting point should save a lot of your time: 1. Authorization form: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/forms.py#L61 2. Login view: http://code.djangoproject.com/browser/d

Re: validate_unique not checking parents of parents' fields?

2011-04-02 Thread Karen Tracey
On Sat, Apr 2, 2011 at 4:37 PM, Bryan wrote: > Is this a bug? Yes: http://code.djangoproject.com/ticket/15321 Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users

Re: Read write config from a file. How?

2011-04-02 Thread Swordfish
Hi! is your file in 'ini' format or simply in 'py'? Regards, Eugeny 02.04.11, 10:34, "hollando" : > Hi, some of my config store in a file not in settings.py. Are there > any build in library doing that? Thanks > > -- You received this message because you are subscribed to the Google Group

validate_unique not checking parents of parents' fields?

2011-04-02 Thread Bryan
As far as I can tell, if one has three models, GrandparentModel, ParentModel, and ChildModel, in which GrandparentModel defines a unique field unique_field, Childmodel.validate_unique() will not check the uniqueness of unique_field. The fields to check are determined by ChildModel._get_unique_chec

How dynamically set "next" parameter in login template to protected page tried to visit?

2011-04-02 Thread Chris Seberino
My views have the standard decorator to automatically bounce clients to the login page if they are not logged in @django.contrib.auth.decorators.login_required I would like to dynamically set the hidden next parameter in the login template to the aforementioned page they were trying to access

Re: Rendering only a portion of the page

2011-04-02 Thread LJ
Thank you, Jorge! Yes, that helps a lot! On Apr 2, 5:18 am, Jorge Bastida wrote: > Hi Lj, > > > I am building a django web app that has a control panel with various > > icons.  Right now, the icons have href tags that load a new page when > > the user clicks the icon.  I want to change this to in

404 POST using SCGI closes web server connection.

2011-04-02 Thread David Korz
The trac system just rejected my submission as spam so I'm going to keep it short and follow up with more detail if anyone cares. Using SCGI a POST to a url handled by django that doesn't exist causes flup to close the connection between the web server (lighttpd in my case) and django. This doesn'

Re: Dajax, what do you think about it?

2011-04-02 Thread Ronghui Yu
I like it very much, it helps me a lot. I believe it's worthy of using it for every Django based project. On Sat, Apr 2, 2011 at 9:54 PM, Eric Hutchinson < eric.hutchin...@burgopakusa.com> wrote: > I don't see the advantage of writing your own ajax views. the examples > save maybe one, two lines

Re: Dajax, what do you think about it?

2011-04-02 Thread Eric Hutchinson
I don't see the advantage of writing your own ajax views. the examples save maybe one, two lines over manually writing your own using plain jquery. you still need to write javascript to submit the forms and what not, so nothing is gained there. you still need to write a 'view' only it's not quite a

Re: Dajax, what do you think about it?

2011-04-02 Thread Jorge Bastida
Hi Sameer, > What do you think about using Dajax and Dajaxice in Django? is it worth? or > you like to write your own ajax code? Probably the answer is... "It depends". If you have 2 o 3 ajax functions and you doesn't want to add another dependency, probably you should create your own views an

Re: Rendering only a portion of the page

2011-04-02 Thread Jorge Bastida
Hi Lj, > I am building a django web app that has a control panel with various > icons. Right now, the icons have href tags that load a new page when > the user clicks the icon. I want to change this to instead call a > jQuery function that will use ajax, or dajaxice, to render only the > conten