Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Building app on already existing set of DB tables [RSS Feed]

#1 Dec. 22, 2010 16:26:08

V.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Building app on already existing set of DB tables


Hi,

I am working on building an app that reports the data from the already
existing tables in the Oracle DB. These tables are data-dictionary
tables and my application will connect to these tables using read-only
access to SELECT and draw graphs on the webpage.
How do I build my application that queries the already existing
tables? Am new to web development and all Django documentation
discusses models that get created according to the models.py.

Scenario:
table v$session contains all the current sessions information and is
under SYS user. My web application should connect as webinfo user that
has read-only access on v$session table, query the data and present it
in webpage.

Do I write views that directly talk to these tables, pull data and
render it online? Or is there a better way?

Thanks
Vikram

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 22, 2010 16:33:36

Fred C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Building app on already existing set of DB tables


I think you can configure your settings to access the database, and after
that, you can run this command:

python manage.py inspectdb > youtfile.txt

Than, you'll have to realocate the models, 'cause django will output all
tables in the database like models.py ;)

Is that what you want?

Hope it help!


Fred Chevitarese - GNU/Linuxhttp://chevitarese.wordpress.com2010/12/22 Vikram <vikramsingh...@gmail.com>

> Hi,
>
> I am working on building an app that reports the data from the already
> existing tables in the Oracle DB. These tables are data-dictionary
> tables and my application will connect to these tables using read-only
> access to SELECT and draw graphs on the webpage.
> How do I build my application that queries the already existing
> tables? Am new to web development and all Django documentation
> discusses models that get created according to the models.py.
>
> Scenario:
> table v$session contains all the current sessions information and is
> under SYS user. My web application should connect as webinfo user that
> has read-only access on v$session table, query the data and present it
> in webpage.
>
> Do I write views that directly talk to these tables, pull data and
> render it online? Or is there a better way?
>
> Thanks
> Vikram
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@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-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 22, 2010 16:35:39

bruno d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Building app on already existing set of DB tables


On 22 déc, 17:22, Vikram <vikramsingh...@gmail.com> wrote:
> Hi,
>
> I am working on building an app that reports the data from the already
> existing tables in the Oracle DB. These tables are data-dictionary
> tables and my application will connect to these tables using read-only
> access to SELECT and draw graphs on the webpage.
> How do I build my application that queries the already existing
> tables? Am new to web development and all Django documentation
> discusses models that get created according to the models.py.http://docs.djangoproject.com/en/dev/howto/legacy-databases/http://www.djangobook.com/en/1.0/chapter16/HTH

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Dec. 22, 2010 19:47:29

I.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Building app on already existing set of DB tables


On Dec 22, 9:22 am, Vikram <vikramsingh...@gmail.com> wrote:
> Scenario:
> table v$session contains all the current sessions information and is
> under SYS user. My web application should connect as webinfo user that
> has read-only access on v$session table, query the data and present it
> in webpage.
>
> Do I write views that directly talk to these tables, pull data and
> render it online? Or is there a better way?

Yes, you should create synonyms (or views, if you want more fine-
grained control) that pull those tables into the Django user's
schema. Inspectdb will not work for synonyms or views in Oracle, so
you will need to write the models by hand.

Cheers,
Ian

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Building app on already existing set of DB tables [RSS Feed]

Board footer

Moderator control

Enjoy the 21st of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support