Create rest service

15 views
Skip to first unread message

soumyajit banerjee

unread,
Nov 5, 2018, 6:55:42 AM11/5/18
to Django users
I have a one database (postgre). Same database currently using by one java application another one is php. But I want to create rest services through python django. Could you please guide me how to start. Actually I'm confused model creation, it's needed to create model or we can write direct sql query through view function. Please suggest me.

Regards,
Soumyajit

PASCUAL Eric

unread,
Nov 5, 2018, 7:03:37 AM11/5/18
to Django users

Hi,


Have a look at the "migrate.py inspectdb" command documentation (https://docs.djangoproject.com/fr/2.1/ref/django-admin/#inspectdb).


This command generates the models for tables in an existing DB. To avoid messing with the existing data, these models are declared as non managed, which means that the tables are not created  nor modified by the migration process.


It should give you a good starting point.


Regards


Eric

Obtention d’aide¶ django-admin help¶. Lancez django-admin help pour afficher des informations d’utilisation et une liste des commandes fournies par chaque application.. Lancez django-admin help--commands pour afficher une liste des commandes disponibles.. Lancez django-admin help <command> pour afficher une description de la commande concernée et une liste de ses options disponibles.

From: django...@googlegroups.com <django...@googlegroups.com> on behalf of soumyajit banerjee <soumya...@gmail.com>
Sent: Monday, November 5, 2018 12:55:42 PM
To: Django users
Subject: Create rest service
 
I have a one database (postgre). Same database currently using by one java application another one is php. But I want to create rest services through python django. Could you please guide me how to start. Actually I'm confused model creation, it's needed to create model or we can write direct sql query through view function. Please suggest me.

Regards,
Soumyajit

--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f37e28be-a09b-4988-a97c-015dc477e0e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages