Hi Jani,
i have direct access to the database where the form is stored. I GET the data using the imported requests e,g [r = requests.get(url, auth=HTTPBasicAuth('username', 'password'))]
so the user would have to input his/her user name and password , and the project name for which they want the forms for. i then create a model with only certain key value pairs i want from the database..
my main problem is the models.py and the database insertion of the forms.
also i have a python script which fetches my data, i do not know how to use views.py to do it.
Thank you in advance..
Faieez
On Monday, June 5, 2017 at 2:07:08 PM UTC+2, Jani Tiainen wrote:
Hi,
First you need to decide how you are going to activate fetch data from remote company database.
Is it a button in user interface, django management commant or maybe timed task?
Secondly you need to decide how to actually fetch that data from remote company database
Through RESTful API? Direct access to database? Some proprietary API?
Finally you need to have models and do necessary data transformations to add data to your local Django database.
But it's not a rocket science. Once you know answers, there are several tools that can help you to achieve your goal easier.
On 05.06.2017 10:48, MOEGAMMAT FAIEEZ WHITE wrote:
Hi i am new to Django, can you please guide me as to how i can fetch data from a companies database and insert it into my database. I have been reading about models.py and serializers.py and all tutorials and readings i came accross has online shown be how to display the database data onto the html and how to export data already in the database as json data.
Disclaimer - This e-mail is subject to UWC policies and e-mail disclaimer published on our website at: https://www.uwc.ac.za/Pages/
emaildisclaimer.aspx
--
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/51eb014a- .88f7-48cb-b729-f3c6e32461d3% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
-- Jani Tiainen
Disclaimer - This e-mail is subject to UWC policies and e-mail disclaimer published on our website at: https://www.uwc.ac.za/Pages/
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5089b155-948f-4af6-aa80-bd45678b5f04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment