On 09/08/2015 04:06 PM, jsa...@nvidia.com wrote:
> I have been planning to develop a standard web application using Django.
> Due to a change in direction, the development plan has been changed to:
> 
>  1. Develop a suite of no-GUI applications that run in a command line
>     window on a server. One other application will run on _clients _in a
>     command line window, and will perform certain operations on the
>     server through a REST API service. However,
>  2. All of the applications will use an SQL database that runs on the
>     server.
>  3. In a later phase of the project, the server applications will be
>     combined and modified to present a GUI.
> 
> My question is this: Is it feasible to make all of the server
> applications use Django to communicate with the database server in step
> 1, and then use it to implement the GUI in step 3? By doing so, I would
> avoid having to (1) code all of the database operations without Django
> in step 1, then recode them with Django in step 3, or (2) end up with a
> "hybrid" application that implements the GUI in Django but the database
> operations outside Django.

Sure, you can write the command-line server applications as Django
management commands, or just as Python scripts that use
`django.conf.settings.configure()` and call `django.setup()` before
using the ORM to communicate with the database.

And you can use the same ORM models to drive your REST API, built in Django.

How you approach step 3 depends on whether "browser-based GUI" is
acceptable, or you need to build an OS-native application. Django is
oriented towards the former, but you can certainly build an OS-native
Python application using a GUI toolkit like Qt or whatever, and still
use the Django ORM within it to talk to the database.

Carl

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55EF5D03.4020503%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to