Re: Can i access my database with Django?(Urgent)
On Thu, Apr 4, 2013 at 4:11 PM, Giorgos Kontogiorgakis
<shortgeorgeaek@yahoo.com> wrote:
> Hi there!
> I am new to Django and Python as well!I have a project to make and i'm
> really confused of what i must do to start it!I hope that you can help me
> somehow to make a start!First of all i have been given an existing database
> with existing tables and columns in it!I started reading Django tutorial 1 &
> 2,i edited the setting.py (DATABASES 'default' item) to match my database
> connection settings.I made the admin part as well and i can log in
> successfully!The thing is that i want to inform the webui from my
> database.For example,i have a table named Nodes with many fields in it and i
> want my webui to "see" this table and its fields so i can see them in my
> webui,access them and edit them!At the tutorial making classes is like
> creating new Tables,and this is not the thing i want to do!Is there any way
> that i can access my already existing database and inform my webui?
>
Django models can specify the table name for a model, or the column
names for a particular field. It can also automatically inspect your
database and produce models from it:
https://docs.djangoproject.com/en/1.5/howto/legacy-databases/
Bear in mind that it will not always make the right choice when
translating a column field to a model field.
Cheers
Tom
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home