Extra attributes in model fields

2008-12-31 Thread sagi s
I'd like to store extra attributes in the model fields so I can control the subsequent field-specific behavior from there. Let's say I have a model that stores metrics I then need to chart. In the view, I prefer not to have some logic that says: metrics = Metric.object.all()

Re: manage.py test without using a database?

2008-12-31 Thread Russell Keith-Magee
On Wed, Dec 31, 2008 at 7:08 AM, Bo Shi wrote: > > Hi, > > One of our django applications does not use django's ORM. Is there a > way to run > > ./manage.py test my_app > > Such that it does not perform test database setup? There are two ways that you could do this. The

Re: SimpleDB Support

2008-12-31 Thread Russell Keith-Magee
On Thu, Jan 1, 2009 at 3:21 AM, Travis Reeder wrote: > > I've read some old threads discussing this, but I'm wondering if any > progress has been made? There certainly isn't anything official to report. Adding support for SimpleDB, CouchDB, Google AppEngine, HBase, or any

Re: about templatetags

2008-12-31 Thread Russell Keith-Magee
On Thu, Jan 1, 2009 at 8:18 AM, Alan wrote: > Happy new year List! > So, I have in a project several apps and they basically use the same > templatetags. I found out by luck that I just need to define it in one > application, something like: > app1/ > models.py > ... >

in db/models/query.py - TypeError: 'exceptions.IndexError' object is not callable

2008-12-31 Thread gkelly
I am having the following error sent to my email from a live site. I haven't been able to reproduce the error myself, but was hoping someone could point me in the right direction as to how to solve this. First of all, is it something in my code, or in Django? The last line of the traceback says

Re: Model fields and arrays?

2008-12-31 Thread Greg Schwimer
On Wed, Dec 31, 2008 at 6:02 AM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > > > > On 31 déc, 05:40, schwim wrote: > > I'm trying to build a model that will store the counts of each of 10 > > possible choices, e.g.: > > > > v1 =

Re: NetBeans IDE for Python

2008-12-31 Thread urlwolf
actually, it looks like one has to build netbeans from source... not being a java person, how dif ficult can this be? I'm trying: hg clone http://hg.netbeans.org/main/ But it's taking forever. I've gotta sleep; will check tomorrow :) On Nov 28 2008, 6:48 pm, Ovnicraft

tagging in Practical Django Projects

2008-12-31 Thread waltbrad
Hi there. I'm still reading this book. I have almost all the templates done for the blog, but I'm stuck on tagging templates. I noticed that with the link_detail view that the bit of code {% if object.tags.count %} was not evaluating to TRUE even though tags were associated with the object.

Re: NetBeans IDE for Python

2008-12-31 Thread urlwolf
Ok, I have checked out the code. Now, where do I put it? And how do I use it? I put it inside the netbeans folder, but nothing seems to have changed. Should I see a 'django project' option anywhere? Thanks On Nov 28 2008, 6:48 pm, Ovnicraft wrote: > 2008/11/27 itsnotvalid

Re: specify alternative settings.py file at startup

2008-12-31 Thread Russell Keith-Magee
On Wed, Dec 31, 2008 at 11:45 AM, dick...@gmail.com wrote: > > i'm confused on the --settings option on manage.py. > > if i have a project call foo, i'd have in ./foo/settings.py > > to run: python manage.py runserver 8080 > > let's say i have a bar.settings.py which contains

about templatetags

2008-12-31 Thread Alan
Happy new year List! So, I have in a project several apps and they basically use the same templatetags. I found out by luck that I just need to define it in one application, something like: app1/ models.py ... app2/ templatetags/mytags.py models.py ... and app1 will use mytags. Is my inference

Outdated data in django page rendering w/ cacheing disabled

2008-12-31 Thread Malinka
I have a django project which will be taking data from a db that is already being managed and maintained by another set of programs and read it and display it for reporting and for determineing possible problems and then in some cases making changes back into the system through other means (not

Re: FormWizard: Setting up a ChoiceField.choices based on previous forms,

2008-12-31 Thread David Durham, Jr.
On Tue, Dec 30, 2008 at 3:16 PM, Ariel Mauricio Nunez Gomez wrote: > Hello list, > Today I started using FormWizard and could not find a clean way to populate > a choices field based on previously submitted forms, I ended up overriding > the render method like this(The

Re: ROOT_URLCONF

2008-12-31 Thread Daniel Roseman
On Dec 31, 12:31 pm, "dick...@gmail.com" wrote: > was looking for some info on how ROOT_URLCONF setting is supposed to > be used? i am trying something very simple. i have a single django > project. there are two apps. > > i want to run one app, call it foo,  with a specific

[job] freelance django developer needed

2008-12-31 Thread derek73
We are currently looking for a Django developer or two to join us on a freelance basis. Our "mission", replyforall.com, is ready for the next phase and we're looking for some additional developer bandwidth to help us take it there. Our current need is more slanted towards a backend web

Re: Using ModelChoiceField with query set - no error but no list either

2008-12-31 Thread phoebebright
Thanks that makes sense. I'll give it go. Happy New Years --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe

SimpleDB Support

2008-12-31 Thread Travis Reeder
I've read some old threads discussing this, but I'm wondering if any progress has been made? Cheers, Travis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: form validation does not work

2008-12-31 Thread Chuck22
Thanks for the reference. The problem is solved with this code modification: def contact(request): if request.method == 'POST': f = ContactForm(request.POST) if f.is_valid(): email = f.cleaned_data['email'] ... #send email return

Re: form validation does not work

2008-12-31 Thread Daniel Roseman
On Dec 31, 12:18 am, Chuck22 wrote: > class ContactForm(forms.Form): >           email = forms.EmailField(required=True, >                              widget=forms.TextInput(attrs= > {'size':'30'}), >                             error_messages={'required':'Please fill > out

Re: form validation does not work

2008-12-31 Thread Chuck22
def contact(request): if request.method == 'POST': f = ContactForm(request.POST) if f.is_valid(): email = f.cleaned_data['email'] ... #send email return HttpResponseRedirect(reverse('contact_success')) else: f=ContactForm()

ROOT_URLCONF

2008-12-31 Thread dick...@gmail.com
was looking for some info on how ROOT_URLCONF setting is supposed to be used? i am trying something very simple. i have a single django project. there are two apps. i want to run one app, call it foo, with a specific settings file, and set of urls, and bar with something else. so, with a

Re: Model fields and arrays?

2008-12-31 Thread Daniel Roseman
On Dec 30, 11:40 pm, schwim wrote: > I'm trying to build a model that will store the counts of each of 10 > possible choices, e.g.: > >     v1 = models.IntegerField(default=0) >     v2 = models.IntegerField(default=0) >     v3 = models.IntegerField(default=0) >     ... >    

Re: Using ModelChoiceField with query set - no error but no list either

2008-12-31 Thread Daniel Roseman
On Dec 31, 11:13 am, phoebebright wrote: > I have a model that has a car and a car has a foreign key to carmodel > via the field model  (too many models!) > > This is the line for the form which appears to run: > >

Re: Calendar

2008-12-31 Thread Karen Tracey
On Wed, Dec 31, 2008 at 9:35 AM, Mario wrote: > > Karen, > > Can you provide me an example of the widget implementation? > Sorry, I am not sure what you are asking for. Someone said (I thought) that they wanted to have calendar inputs like the admin uses, only in their

Using ModelChoiceField with query set - no error but no list either

2008-12-31 Thread phoebebright
I have a model that has a car and a car has a foreign key to carmodel via the field model (too many models!) This is the line for the form which appears to run: carmodel=forms.ModelChoiceField(queryset=Car.objects.all().values ('model','model__name').distinct() ) It generates the correct SQL

Re: Calendar

2008-12-31 Thread Mario
Karen, Can you provide me an example of the widget implementation? _Mario On Dec 30, 9:30 am, "Karen Tracey" wrote: > On Tue, Dec 30, 2008 at 7:51 AM, Praveen > wrote: > > > > > Hi All, > > I want to use calendar in my html template as the

Re: Installing Django 1.0.2...

2008-12-31 Thread Karen Tracey
On Wed, Dec 31, 2008 at 9:20 AM, Peter wrote: > > Python cannot find django/utils/version.py. Usually everything needed > for > to run django (which is everything in the 'django' folder) is put > under the folder 'site-packages' > in your pythin installation. AFAIK simply

Re: Installing Django 1.0.2...

2008-12-31 Thread Peter
Python cannot find django/utils/version.py. Usually everything needed for to run django (which is everything in the 'django' folder) is put under the folder 'site-packages' in your pythin installation. AFAIK simply copying C:\Django-1.0.2-final \django to site-packages\django should work. --

Re: Installing Django 1.0.2...

2008-12-31 Thread Karen Tracey
On Wed, Dec 31, 2008 at 3:36 AM, mic wrote: > > I am a first time python/django user > > running "python setup.py install" gives me this error > > Traceback (most recent call last): > File "setup.py", line 69, in >version = __import__('django').get_version() > File

Re: Inline problem in Postgres but not MySQL

2008-12-31 Thread Peter
I just installed 1.0.2 final and the bug has been fixed in that. -- Peter --~--~-~--~~~---~--~~ 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@googlegroups.com To

Re: Writing your first Django app

2008-12-31 Thread johan
Thank you for the response. Good explanation Briel. Turned out I was loading the wrong URL but start to get an understanding for how Django works now. (I think!) till Django 2008/12/29 Briel > > The quick answer: > This goes into views.py (copied from the tutorial). > >

Re: Model fields and arrays?

2008-12-31 Thread bruno desthuilliers
On 31 déc, 05:40, schwim wrote: > I'm trying to build a model that will store the counts of each of 10 > possible choices, e.g.: > > v1 = models.IntegerField(default=0) > v2 = models.IntegerField(default=0) > v3 = models.IntegerField(default=0) > ... >

Installing Django 1.0.2...

2008-12-31 Thread mic
I am a first time python/django user running "python setup.py install" gives me this error Traceback (most recent call last): File "setup.py", line 69, in version = __import__('django').get_version() File "C:\Django-1.0.2-final\django\__init__.py", line 13, in get_version from

Installing Django 1.0.2...

2008-12-31 Thread mic
I am a first time python/django user.. Running "python setup.py install" from django-1.0.2-final directory gives me this error Traceback (most recent call last): File "setup.py", line 69, in version = __import__('django').get_version() File "C:\Django-1.0.2-final\django\__init__.py",

Re: Model fields and arrays?

2008-12-31 Thread raj
I too checking for similar thing. Need to store a list of integers/ floats in the model. When we find existing form fields as inadequate, we can define our own fields. What about following the same way here for model fields too? On Dec 31, 9:40 am, schwim wrote: > I'm trying

Re: Getting SQL from QuerySet

2008-12-31 Thread Matías Costa
On Tue, Dec 30, 2008 at 9:11 PM, Info Cascade wrote: > > Hi -- > > I am getting intermittent errors on certain database queries on our > production server. > I am having a hard time duplicating them (most of the time they run > okay, only sometimes on the production