Monday, January 30, 2012

Re: Django models

hi michael,

Thanks for the tip. It is a huge step in my progress.

However what does this error say?

ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

Best Regards,

Stanwin Siow

On Jan 30, 2012, at 8:37 PM, Michael Elkins wrote:

> On Mon, Jan 30, 2012 at 04:13:50AM -0800, St@n wrote:
>> How do i ask django to query for a table that is already created in
>> the database but not part of the models.py?
>>
>> the models.py is used to described the database and to create tables
>> with that models.py. However i already have my tables created prior to
>> creating the django app.
>>
>> How then do i get django to query those tables created before?
>
> You can use "django-admin.py inspectdb" to generate a models.py based on an existing database:
>
> https://docs.djangoproject.com/en/1.3/ref/django-admin/#inspectdb
>
> --
> 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.
>

--
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