Thanks. That works.

Now I'm only getting partial form (NAME AND PHONE INBOX BOX IS
DISPLAYED) with a bunch of html code. The html code
isn't being rendered properly. Any ideas

<html>
<head>
<title>Contacts</title>
</head>

<body>




<form action='/contacts/' method='POST'>
<input type='hidden' name='edit_id' value=''>
<table>
Name:       Phone:       (NAME AND PHONE BOX IS HERE)
<tr>
<td colspan=2 align=right>
<input type=submit name='submit_action' value='Add'>
</td>
</tr>
</table>
</form>


</html>

On Sep 4, 3:51 pm, John <[EMAIL PROTECTED]> wrote:
> I've created a forms application. After running syncdb without any
> errors I thought database connection with MYSQL was working. Django
> tables have been created.
>
> After I entered  http://localhost:8000/contactsI get the following
> error.
>
> ProgrammingError at /contacts/
> (1146, "Table 'iansfree.contacts_contact' doesn't exist")
> Request Method:         GET
> Request URL:    http://localhost:8000/contacts/
> Exception Type:         ProgrammingError
> Exception Value:        (1146, "Table 'iansfree.contacts_contact' doesn't
> exist")
> Exception Location:     C:\Python25\lib\site-packages\MySQLdb
> \connections.py in defaulterrorhandler, line 35
>
> It seems that model.py(below)  isn't working.
>
> from django.db import models
>
> # Create your models here.
> class Contact(models.Model):
>     name = models.CharField(maxlength=200)
>     phone = models.CharField(maxlength=200)
>
> Would anyone know why the table Contact isn't being created in MySQL?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to