>I am trying to create a RESTful API with a django website i have
>running. The project folder is called rosebud and inside the folder r2
>lies my application.
>
>I have tried to retrieve objects by calling the Users table in
>django's default authentication model.
>
>But i have problems retrieving objects from other tables in my
>database. Is it something to do with how i defined my model.py?
>
>I have this table called timeline in my database but each time i run
>the server and query it, it comes back with an error saying
>r2_timeline table does not exist.
>
>the error msg is sound because r2_timeline really does not exist. What
>exists is the table TIMELINE.
The tables in the database get the name <app_name>_<model_name>.
Since your app is named r2, the timeline model will be put in a
table named r2_timeline.
Did you run "manage.py syncdb" to create the tables after you
created your models.py?
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment