RE: Help with Custom model field and custom validation for EmailField()

2012-11-03 Thread bb6xt
Hi, If all u nid is a field whose value is a comma separated list of emails den u dont nid a custom field at all. All u nid is a gud ol CharField. Just set it like so: emails=models.CharField(max_length=500, validators=[multi_email_validator,]). here is what multi_email_validator looks like: from

Re: Location of non-app-specific static files?

2012-11-03 Thread Elena Williams
Hi Ryan, I'm not sure if it helps but not long ago I found this by Simon Willison on Quora: http://www.quora.com/Django/How-do-you-organize-the-code-in-your-Django-project Cheers, Elena :) --- Elena :) @elequ 04022 90172 On Sun, Nov 4, 2012 at 10:23 AM, Ryan wrote: > Hi, > > I have been won

Location of non-app-specific static files?

2012-11-03 Thread Ryan
Hi, I have been wondering where people put their non-app-specific static files in their django projects? For example, the base css file that applies to all pages across the project or perhaps the jquery file? Currently I have the following structure: . ├── app │ ├── __init__.py │ ├── mode

Re: tutorial first step. -ImportError: No module named django.core-

2012-11-03 Thread Elena Williams
Hi Francesco, What you're seeing is the most basic django/python error. It means that your python can't find django from your current path. You should start by checking for the simple things. What happens when you try putting the following in your terminal?: $ python and then: >>> import django

Re: Django and HSQLDB

2012-11-03 Thread Russell Keith-Magee
On Sat, Nov 3, 2012 at 8:32 PM, Abracadab wrote: > Hi, all. I'm building a Django app against a legacy HSQLDB database > (the existing user interface is built in OpenOffice Base). Is there a > way to use HSQLDB with Django? Alternatively, does anyone know if > there's a way to easily alter the ex

Re: django1.5 subclass AbstractUser, How to get a password-(re)set field in admin

2012-11-03 Thread Russell Keith-Magee
On Sat, Nov 3, 2012 at 11:15 PM, Michael Muster < michael.mus...@googlemail.com> wrote: > Hi again, > > I have a subclass from AbstractUser > > 1 from django.contrib.auth.models import AbstractUser > 2 from django.conf import settings > 3 > 4 class cpUser(AbstractUser): > 5 twitter = models.Ch

Re: planetdjango.org down?

2012-11-03 Thread Alexandre Provencio
Alright, its working again, thank you :) On Fri, Nov 2, 2012 at 6:30 AM, Adomas Paltanavičius wrote: > 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

tutorial first step. -ImportError: No module named django.core-

2012-11-03 Thread Francescos
Hello everyone, Following the django tut I've sat up all the installation and reached the step where I had to run the command: django-admin.py startproject mysite result: I receive the error specified in the subject. I installed virtualenv (as said here

Re: Django and HSQLDB

2012-11-03 Thread Nick Apostolakis
On Sat, Nov 3, 2012 at 2:32 PM, Abracadab wrote: > Hi, all. I'm building a Django app against a legacy HSQLDB database > (the existing user interface is built in OpenOffice Base). Is there a > way to use HSQLDB with Django? Alternatively, does anyone know if > there's a way to easily alter the ex

Re: GeometryField.geography = True Syntax Help GIS Model

2012-11-03 Thread JJ Zolper
Thanks for the reply. I actually already have PostgreSQL. So my question was pretty direct, or so I thought. I'll try and spell this out again. So if I want to create a column in my database with type "geography" is this the syntax: mpoly = models.MultiPolygonField(geography=true) I cannot fi

Re: selenium test for fallback page loaded from app cache when server is unavailable

2012-11-03 Thread Brad Pitcher
Are you having the selenium test go to online.html first like in your manual test? Maybe you need to have selenium hit offline.html first and cache that page? On Nov 3, 2012 6:14 AM, "Joao Coelho" wrote: > Hi. I haven't been able to figure this one out. Trying to write an > automated test that us

Re: models.DecimalField with value 0 shows up as "0E-8" in admin forms by default. Is there a workaround?

2012-11-03 Thread Ben Roberts
If anyone down the road ends up looking for a solution to this, I worked it out via StackOverflow: http://stackoverflow.com/questions/13163167/how-to-get-a-django-admin-form-field-for-a-models-decimalfield-with-value-0-to-n/13210775#13210775 On Wednesday, October 31, 2012 12:37:26 PM UTC-6, Ben

django1.5 subclass AbstractUser, How to get a password-(re)set field in admin

2012-11-03 Thread Michael Muster
Hi again, I have a subclass from AbstractUser 1 from django.contrib.auth.models import AbstractUser 2 from django.conf import settings 3 4 class cpUser(AbstractUser): 5 twitter = models.CharField(max_length=100) 6 def __unicode__(self): 7 return self.username and AUTH_USER_MODEL

RE: Tutorial Help!

2012-11-03 Thread lacrymol...@gmail.com
Wasn´t a 'myproject' directory created where you ran the command? -Mensaje original- De: almel Enviados: 03/11/2012 06:21:19 Asunto: Tutorial Help! I'm new to Django and trying out the tutorial and almost immediately getting stuck. I'm running django version 1.5, python version 2.7.2,

mysql slow query flooded with set timestamp = ; commit

2012-11-03 Thread Yanhong Wu
I'm using django 1.3, recently I found mysql slow query log was flooded by the following query: # User@Host: user[user] @ [192.168.1.10] # Thread_id: 2948369 Schema: db Last_errno: 0 Killed: 0 # Query_time: 6.705106 Lock_time: 0.00 Rows_sent: 0 Rows_examined: 0 Rows_affected: 0 Ro

Re: Want help in Django basic configuration

2012-11-03 Thread Daniel Roseman
On Saturday, 3 November 2012 05:55:21 UTC, sudeep gangal wrote: > hey guys hiii, > I am new to the django. I used the inspectdb command to copy the content > of my db table made in mysql in django model.py. But that file doesn't > contain any foreign key etc. > I have declared primary keys and

Re: Tutorial Help!

2012-11-03 Thread Daniel Roseman
On Saturday, 3 November 2012 09:21:19 UTC, almel wrote: > I'm new to Django and trying out the tutorial and almost immediately > getting stuck. I'm running django version 1.5, python version 2.7.2, and > windows 7, and when I type into the command prompt > > django-admin.py startproject mysite

Want help in Django basic configuration

2012-11-03 Thread sudeep gangal
hey guys hiii, I am new to the django. I used the inspectdb command to copy the content of my db table made in mysql in django model.py. But that file doesn't contain any foreign key etc. I have declared primary keys and unique keys. But for relating 2 tables a foreign key is required. Can anyo

selenium test for fallback page loaded from app cache when server is unavailable

2012-11-03 Thread Joao Coelho
Hi. I haven't been able to figure this one out. Trying to write an automated test that uses selenium.webdriver.firefox.webdriver The manifest file has FALLBACK: /online.html /offline.html So that at /online.html the browser displays the cached copy of /offline.html when the server is offline A

Tutorial Help!

2012-11-03 Thread almel
I'm new to Django and trying out the tutorial and almost immediately getting stuck. I'm running django version 1.5, python version 2.7.2, and windows 7, and when I type into the command prompt django-admin.py startproject mysite (I can't get rid of this green blob) The command runs, but it doe

Django and HSQLDB

2012-11-03 Thread Abracadab
Hi, all. I'm building a Django app against a legacy HSQLDB database (the existing user interface is built in OpenOffice Base). Is there a way to use HSQLDB with Django? Alternatively, does anyone know if there's a way to easily alter the existing database to any of the existing Django/SQL interface

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

2012-11-03 Thread Chris Pagnutti
I've never done it myself, but I think you'd just define the clean method in your Form's class (i.e. in forms.py), and the first line in your clean() method should call the parent classes, clean() method - to do this you need to call the super() method, which is just regular python. It think the c

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

2012-11-03 Thread Dilip M
Hi Chris, Thank you very much for your time on this. I am not able to make out on how could I put this under clean() method. Ex: What does "you must call the*parent class's clean() "* mean in "if you would like to override the clean() method and maintain the _default validation_, you must call the