Re: OperationalError 1054 Unknown column

2007-08-10 Thread AnaReis
Hum... I thought that to be an AutoField it was mandatory that "_id" would have to be added to the name of the field... Apparently not! :) Thanks. Ana On Aug 9, 6:57 pm, Collin Grady <[EMAIL PROTECTED]> wrote: > Why did you add _id to your model definition for levelID ? The column > does not hav

Re: OperationalError 1054 Unknown column

2007-08-10 Thread AnaReis
Hum... I thought that to be an AutoField it was mandatory that "_id" would have to be added to the name of the field... Apparently not! :) Thanks. Ana On Aug 9, 6:57 pm, Collin Grady <[EMAIL PROTECTED]> wrote: > Why did you add _id to your model definition for levelID ? The column > does not hav

OperationalError 1054 Unknown column

2007-08-09 Thread AnaReis
Hi all, I'm working with a MySQL legacy DB which was changed. This was our previous Level table: +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+

Re: Can't see the SQL queries being executed by Django

2007-08-08 Thread AnaReis
On Aug 8, 12:53 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/8/07, AnaReis <[EMAIL PROTECTED]> wrote: > > > I have DEBUG=true in the settings file. > > Perhaps you mean DEBUG = True? The case of "true" matters. > > > I ope

Re: Can't see the SQL queries being executed by Django

2007-08-08 Thread AnaReis
On Aug 8, 12:53 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/8/07, AnaReis <[EMAIL PROTECTED]> wrote: > > > I have DEBUG=true in the settings file. > > Perhaps you mean DEBUG = True? The case of "true" matters. > > > I ope

Can't see the SQL queries being executed by Django

2007-08-08 Thread AnaReis
Hi, I've been having some problems in the project I'm building with Django and a legacy MySQL database. I needed to see the SQL queries that are being executed by Django. I have DEBUG=true in the settings file. I opened a python shell and typed: >>> from django.db import connection >>> connection.

Re: Problem when deleting a register from the database

2007-07-27 Thread AnaReis
On Jul 26, 4:24 pm, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > AnaReis skrev: > > > Hi all! > > I have a delete that isn't working properly. It deletes more than 1 > > register when it shouldn't because I'm specifying the primary key in > >

Problem when deleting a register from the database

2007-07-26 Thread AnaReis
Hi all! I have a delete that isn't working properly. It deletes more than 1 register when it shouldn't because I'm specifying the primary key in the filter. The class file is this: class UserInstrument(models.Model): user_name = models.CharField(primary_key=True, maxlength=60) instrument_n

Re: Problem when inserting into a table with a MySQL auto_increment primary key

2007-07-19 Thread AnaReis
On Jul 18, 6:14 pm, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > AnaReis skrev:> Hi all, > > I have a problem when inserting a register into this table that I'm > > working with. > > This table belongs to a MySQL database and the storage engine is > >

Problem when inserting into a table with a MySQL auto_increment primary key

2007-07-18 Thread AnaReis
Hi all, I have a problem when inserting a register into this table that I'm working with. This table belongs to a MySQL database and the storage engine is MyISAM. The database that I'm using is a legacy database and I can't change it in any way. When I insert a register into the table it's MySQL w

Problem when filling the options of a Choice Field with information from the database

2007-07-10 Thread AnaReis
Hi, I have a form on my project which has a drop down list with several options that are loaded from a table in a database. The code is this: class ProductForm(forms.Form): instrument_Name=ChoiceField(required=False, choices=[(i.instrument_name,i.instrument_name) for i in Instrument.objects.a

Re: How to know what went wrong with the .save()

2007-07-05 Thread AnaReis
combined, so their combination has to be unique. Is there a way for me to do this without having to change the database? Just changing the models.py file? Thanks for your help! Ana On Jul 5, 8:26 am, AnaReis <[EMAIL PROTECTED]> wrote: > On Jul 4, 4:35 pm, RajeshD <[EMAIL PROTECTED]> wrote:

Re: How to know what went wrong with the .save()

2007-07-05 Thread AnaReis
combined, so their combination has to be unique. Is there a way for me to do this without having to change the database? Just changing the models.py file? Thanks for your help! Ana On Jul 5, 8:26 am, AnaReis <[EMAIL PROTECTED]> wrote: > On Jul 4, 4:35 pm, RajeshD <[EMAIL PROTECTED]> wrote:

Re: How to know what went wrong with the .save()

2007-07-05 Thread AnaReis
On Jul 4, 4:35 pm, RajeshD <[EMAIL PROTECTED]> wrote: > On Jul 4, 12:14 pm, AnaReis <[EMAIL PROTECTED]> wrote: > > > Hi again, > > Thanks for the suggestion, but this still isn't working... the > > difference between this module and the others that I h

Re: How to know what went wrong with the .save()

2007-07-04 Thread AnaReis
Hi again, Thanks for the suggestion, but this still isn't working... the difference between this module and the others that I have already made is that (besides the fact that the others actually work) this one involves a table with two primary keys. If it had just one I bet there would be no probl

How to know what went wrong with the .save()

2007-07-03 Thread AnaReis
Hi! In my project, I'm doing a .save() but nothing is being saved and I cant figure out why... The code is: [models.py] class LevelForm(forms.Form): level_Name=RegexField('^level\d[a-b]?$', required=True, max_length=20, initial='level', error_message='Blah') instrument_Name=ChoiceField(re

Re: Using more than one database in the project

2007-06-29 Thread AnaReis
orts multiple databases and I'm working on > getting the merges I've made from trunk checked in at the moment... That's > probably your best bet, watch this space! > Ben > > On 28/06/07, AnaReis <[EMAIL PROTECTED]> wrote: > > > > > > > Hi! &g

Using more than one database in the project

2007-06-28 Thread AnaReis
Hi! As I said in previous posts I'm a newbie in these django stuff. I'm creating a project that consists in a web based GUI for managing some databases. This project has several modules. The user is presented with a start page where it is possible to chose which database to manage. I have now fini

Re: Forms and formating error messages

2007-06-28 Thread AnaReis
On Jun 27, 9:41 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-06-27 at 02:26 -0700, AnaReis wrote: > > Hi again, > > This is getting very frustrating because I can't make this work... > > This is exactly what I wrote in the files: > > In

Re: Problem with URL

2007-06-28 Thread AnaReis
ai <[EMAIL PROTECTED]> wrote: > > > Hello, > > > On Jun 27, 10:55 am, AnaReis <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > I'm having a problem here and I don't really know how to solve it. > > > I have a form on a page, the add

Re: Forms and formating error messages

2007-06-27 Thread AnaReis
Hi again, This is getting very frustrating because I can't make this work... This is exactly what I wrote in the files: [newforms.py] from django import newforms as forms from django.newforms.forms import BoundField from django.template import Context, loader class TemplatedForm(forms.Form):

Problem with URL

2007-06-27 Thread AnaReis
Hi, I'm having a problem here and I don't really know how to solve it. I have a form on a page, the add user page: (r'^manager/operations/nlsciadc/users/adduser/$', add_user), #The template is add_user.html When the user presses submit, the action on the form sends the user to: This on my urls

Re: Forms and formating error messages

2007-06-26 Thread AnaReis
I managed to solve this: from Manager.utils.newforms import TemplatedForm Thanks for the help! Ana --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Forms and formating error messages

2007-06-26 Thread AnaReis
Hum... I tried to test the imports on IDLE but I couldn't import the file in anyway I tried.. I went to the Path Browser on IDLE and I couldn't find the newforms.py file that I created. I then noticed that in all the other folders there was a file named __init__.py, so I copied one of those init

Re: Comparing two passwords

2007-06-26 Thread AnaReis
Hum... ok, thanks a lot! :) Ana --~--~-~--~~~---~--~~ 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 from this group, send email to

Re: Comparing two passwords

2007-06-26 Thread AnaReis
On Jun 26, 12:30 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-06-26 at 04:57 -0700, AnaReis wrote: > > Hi, > > I've been trying to compare two passwords, but I always get the same > > error. This was taken from the django test web page and

Comparing two passwords

2007-06-26 Thread AnaReis
Hi, I've been trying to compare two passwords, but I always get the same error. This was taken from the django test web page and I tried to run it on my idle shell: class UserRegistration(Form): username = CharField(max_length=10) password1 = CharField(widget=PasswordInput)

Re: Forms and formating error messages

2007-06-26 Thread AnaReis
On Jun 26, 3:09 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-06-25 at 08:22 -0700, AnaReis wrote: > > Hi, > > I was trying to change the way in which the errors are presented in a > > form. > > I tried to put them in: &

Forms and formating error messages

2007-06-25 Thread AnaReis
Hi, I was trying to change the way in which the errors are presented in a form. I tried to put them in: {{field.label}}:{{field}}{% if field.field.required %}*{%endif%}{%if field.errors%}{{field.errors}}{%endif%} but I still get them formatted as an and I would like the errors to appear as simple

Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread AnaReis
It works!! Thanks again! I don't know what I would do without this Django users group! :D Ana --~--~-~--~~~---~--~~ 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: How to put an asterisk next to the required form fields?

2007-06-25 Thread AnaReis
Well none of the previous solutions works... :( I tried the "if field.required" and the "if field.formfield.is_required" (this particular solution probably doesn't work because I'm using the newforms). and I put required=True on the required forms... :S --~--~-~--~~~-

How to put an asterisk next to the required form fields?

2007-06-25 Thread AnaReis
Hi! I have this form where I want to put red asterisks after each required field, but I can't find a way to do it... This is my template code: {%for field in form%} {{field.label}}{{field}}{%if something_goes_here %}*{%endif%} {%endfor%} My pr

Re: CSS on dev server, same old problem

2007-06-18 Thread AnaReis
emplate: > href="/manager/appsmedia/css/css1.css" /> > > This is what I used: > > (r'^site_media/(?P.*)$', 'django.views.static.serve', > {'document_root': '/home/user/django/project/site_media'}), > > Works fine.

Re: CSS on dev server, same old problem

2007-06-18 Thread AnaReis
On Jun 15, 5:22 pm, alg <[EMAIL PROTECTED]> wrote: > > > I can see the css files code on the web browser > > through:http://145.23.6.135:8000/manager/appsmedia/css/css1.css > > You're using an absolute path in the link element's href. Hum... How do I use a dynamic path? (Sorry if it's a lame

CSS on dev server, same old problem

2007-06-15 Thread AnaReis
Hi, I still don't understand if the Djangos' dev server allows the usage of css files on a web page or if it only allows accessing the files directly (for ex. http:something:8000/proj/appsmedia/css1.css shows the css code on the browser). If it does allow the usage of css on templates then here is