Re: GeometryField.geography = True Syntax Help GIS Model

2012-11-02 Thread Christiano Anderson
First of all, you have to create a geo database. Postgis (a PostgreSQL extension) is the best choice. After that, you have to define some geography fields and import your data, shape files (shp), etc. GeoDjango Tutorial provides all the steps to get it done.

Re: Django Development Model

2012-11-02 Thread Russell Keith-Magee
On Sat, Nov 3, 2012 at 7:58 AM, Smriti Patodi wrote: > Hello Dennis, > > Yes you are right..I am looking for how the Django effort itself is > managed by the developers and the Django community in general? > > I want to get more information on: > > - how Django team

Re: GeometryField.geography = True Syntax Help GIS Model

2012-11-02 Thread JJ Zolper
Wait so does anyone know how to do this? I posted this a long time ago. How do I define a geography field? I need a geography column so I can perform geographic queries on it and the documentation doesn't give me a definitive way on how to do it. Would it be like: city =

Re: Django Development Model

2012-11-02 Thread Elena Williams
Smriti, If you're really interested from the "horse's mouth" -- I'd suggest googling DjangoCon and DjangoCon EU recordings (they are often on blip.tvbut the most recent ones were put up by youtube.com/jessenoller. Most DjangoCon have a core-team sit-down and/or fireside chat with BDFL/s and this

Re: Django Development Model

2012-11-02 Thread Smriti Patodi
Hello Dennis, Yes you are right..I am looking for how the Django effort itself is managed by the developers and the Django community in general? I want to get more information on: - how Django team gathers requirements for each release - how does the planning go on for each

Confusion with translations

2012-11-02 Thread Santiago Basulto
Hello people, i'm having some difficult time with translation and I18N. I'm using in my project django-user-accounts (from Pinax) but I can't translate the strings there. When I call manage.py makemessages -l es_AR I don't see translation for this app ("account"). I've got installed correctly.

Re: compiler

2012-11-02 Thread Bill Freeman
Surely the error message included a line number? Also, probably not related, but check that there is no whitespace after your line ending back-slashes. (Hint it is safer to put the opening triple quote before the backslash, and safer yet to put the triple quoted string in a pare of parentheses,

Re: no Polls in the admin page

2012-11-02 Thread Zakk Ng
Actually the the admin.py as mentioned above is required. If you have coded the model for Poll app then make sure the command *python manage.py syncdb *is executed. On Friday, November 2, 2012 1:59:18 AM UTC+7, Mihail Mihalache wrote: > > I have followed the django tutorial up to part 2 - >

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Chris Pagnutti
Ahh. Just saw your link to overriding the clean() method. So you could put all the same logic above into the clean() method instead. On Friday, November 2, 2012 4:36:20 AM UTC-4, Dilip M wrote: > > Hi, > > I am new to Django. Went through docs before posting this.. I have a model > and form

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Chris Pagnutti
Again, I'm not sure, but I think to do it at Model validation level you'd have to modify some of the django core files themselve. I think what you're looking for is in django.core.validators (in my install this file is at /lib/python2.7/site-packages/django/core/validators.py, or you can just

Re: unable to save ModelForm with primary key change

2012-11-02 Thread Michael P. Soulier
On 02/11/12 Tom Evans said: > Hmm, looks ok.. do you end up with two entries in the DB, one with the > old primary key, and one with the new primary key? No, and I expected to. > Personally, I don't use natural primary keys with Django, I always let > it create an 'id' primary key, and then add

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Dilip M
On Fri, Nov 2, 2012 at 5:52 PM, Chris Pagnutti wrote: > Hi. I'm pretty new to Django too, so someone else probably has a better > idea. But I think that on the server side, you can handle additional > validation in the view that handles the form submission (i.e. the

Re: haystack problem - already registered error

2012-11-02 Thread Laxmikant Gurnalkar
Hey Any Solution on this ? On Wednesday, September 15, 2010 4:53:26 AM UTC+5:30, Kenneth Gonsalves wrote: > > hi, > > I have installed haystack with xapian backend. My relevant code is like > this: > > import haystack > haystack.autodiscover() > > from haystack.indexes import * > from haystack

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Chris Pagnutti
Hi. I'm pretty new to Django too, so someone else probably has a better idea. But I think that on the server side, you can handle additional validation in the view that handles the form submission (i.e. the view that the "action" attribute in your form points to). You can probably attach

Re: unable to save ModelForm with primary key change

2012-11-02 Thread Tom Evans
On Thu, Nov 1, 2012 at 7:10 PM, msoulier wrote: > On Nov 1, 1:27 pm, Tom Evans wrote: >> >> Please show the definition of MyForm. >> >> Please do show it. > > Sorry, the model was in the previous email, here's the form. > > > class

Re: django 1.5, subclass AbstractUser -> NameError: name 'settings' is not defined

2012-11-02 Thread Michael Muster
On Fri, Nov 02, 2012 at 10:15:11AM +0100, Raffaele Salmaso wrote: > did you forget to include > from django.conf import settings > in /home/michael/www/project/news/models.py? > > -- > | Raffaele Salmaso Yep, adding it did it :) Thanks to both of you! -- Michael -- You received this message

Re: django 1.5, subclass AbstractUser -> NameError: name 'settings' is not defined

2012-11-02 Thread Raffaele Salmaso
On Fri, Nov 2, 2012 at 10:11 AM, Michael Muster wrote: > File "/home/michael/www/project/news/models.py", line 28, in News > author = models.ForeignKey(settings.AUTH_USER_MODEL) > NameError: name 'settings' is not defined > NameError: name 'settings' is not

Re: django 1.5, subclass AbstractUser -> NameError: name 'settings' is not defined

2012-11-02 Thread Michael Muster
On Fri, Nov 02, 2012 at 04:59:35PM +0800, Russell Keith-Magee wrote: > Can you run: > > ./manage syncdb --traceback > > so we can get the full context of the error message? > Sure, here it is: :~/www/project$ python manage.py syncdb --traceback Traceback (most recent call last): File

Re: django 1.5, subclass AbstractUser -> NameError: name 'settings' is not defined

2012-11-02 Thread Russell Keith-Magee
(Apologies for the first reply -- my send button misfired…) Hi Michael, It sounds like something else - not related to the your User model - is going wrong with your app; the error about settings doesn't sound like something the auth system would be generating. Can you run: ./manage syncdb

Re: django 1.5, subclass AbstractUser -> NameError: name 'settings' is not defined

2012-11-02 Thread Russell Keith-Magee
On Fri, Nov 2, 2012 at 4:34 PM, Michael Muster < michael.mus...@googlemail.com> wrote: > Hi, > > I am using django 1.5 and want to add an extra > field to the django user class. > The documentation says that i have to subclass AbstractUser > and add extra fields to it. > > So i tried it, in my

Re: planetdjango.org down?

2012-11-02 Thread Adomas Paltanavičius
On Friday, October 26, 2012 3:35:45 PM UTC+1, Alexandre Provencio wrote: > > Can't access since yesterday :/ > I am looking into this. Should be back over the weekend. Thanks! Adomas -- You received this message because you are subscribed to the Google Groups "Django users" group. To view

django 1.5, subclass AbstractUser -> NameError: name 'settings' is not defined

2012-11-02 Thread Michael Muster
Hi, I am using django 1.5 and want to add an extra field to the django user class. The documentation says that i have to subclass AbstractUser and add extra fields to it. So i tried it, in my app 'news' i have: from django.contrib.auth.models import AbstractUser class cpUser(AbstractUser):

Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Dilip M
Hi, I am new to Django. Went through docs before posting this.. I have a model and form like this. models.py: class Recipients(models.Model): dev = models.EmailField() qa = models.EmailField() cc = models.MultipleEmailField() forms.py: class RecipientsForm(forms.ModelForm):

Re: no Polls in the admin page

2012-11-02 Thread Elena Williams
Actually the minimum requirement for the application to appear in admin is this (here in docs: https://docs.djangoproject.com/en/dev/intro/tutorial02/#make-the-poll-app-modifiable-in-the-admin): admin.py: from django.contrib import admin from mysite.polls.models import Poll, Choice #

Admin, m2m relationship and custom save method: is save_related of any help?

2012-11-02 Thread Fabio Natali
Hi! Snippet: http://dpaste.com/822354/ Idea: a product is made up of different components, each component having a certain cost. I want a model for product and component. Given a product I need to know its total cost. Example: a car is made up of 4 wheels, 1 body and 1 engine. Given that