On Mon, Mar 26, 2018 at 5:26 PM, Damon Branch <damonbran...@gmail.com> wrote:
> Hi,
> I'm developing a website which contains a database. I then need to be able
> to update that database from a separate python application like a desktop or
> mobile app.
> I am new to Django and fairly new to Python (few months).
> After reading the introductory materials I'm thinking the way to do this is:
>
> 1. Write the website application which can update database entries with a
> call like ' myModel.Create(info1='blah', info2='blah') '
> 2. Package this application/website into something like 'django-myWebsite'
> 3. In my other program/app import my package like 'from django-myWebsite
> import *'
> 4. Make calls to the website via my package like '
> myModel.Create(info1='blah', info2='blah') '
>
> Is this the right approach/will it work or is there a better way to do it?
> Also, are there any examples of accessing a django built website through
> another program?

A bit confused but your saying 'accessing a django built website'
through another program. Do you mean access the server? I do that, and
also access the database, all the time. I have stand alone python
scripts that access the server using python requests or instantiating
one of my server's objects the same way a request from the browser
would. And I have script that access the db, both using the ORM and
with embedded SQL.

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY6qEvjGud1niYsAfj3R%3D_5WMQ5EBrY6oDwCBkTFk2JSsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to