django remote access basics - python

i have scripts producing outputs and other scripts reading these. All data should be read/written from/to a database on a server with corresponding information from multiple remote terminals.
I felt like django seems to be a nice solution.
Unfortunately the documentation and examples are only about setting up the data base and accessing it locally or via a browser. I get the impression that django is not offering this since i can not find anything about it and i was searching a lot.
Could someone help or link some examples how to write/read to the database on a server from an other machine?
Cheers,
Daniel

In the end, I figured out with the help of this!

Related

How can i acctually get to uploading python projects on public internet?

How is websites like pythonanywhere developed?
Are there any other ways to upload python projects on servers publicly?
I want to know if there is a way to straightly create servers and stuff.
Thanks.
I tried pythonanywhere but it didnt work out as i expected.
If I am taking it correct, you want to showcase your projects to the community publically. What I saw in the website is it is a type of online compiler. Means you can only run your code there.
For showing it publically there are many other websites such as the most popular
Github

Setup Apache Server With Django (hopefully also with git)

I've created a website and would now like to host it. I already have an apache server setup
I literally have no clue what to do and how to go further, The tutorials online haven't been much help too, since I'm still utterly lost, I've figured out there is a command shell but don't really know how to use it even when the code is right in front of me. If someone could steer me in the right direction that would be a huge help. I have looked at multiple different tutorials, videos and articles, and still have no idea what to do. I'd also love if someone could show me how to use the server with git so when I want to update the server, I can simply by pushing (similar to Heroku I think)
Thank you
You have to install mod_wsgi library in the apache folder and create an app.wsgi file.
Please thoroughly refer this article - https://www.codementor.io/#aswinmurugesh/deploying-a-django-application-in-windows-with-apache-and-mod_wsgi-uhl2xq09e

What do I need to successfully run a website in my browser that executes Python scripts?

I currently simply have a local website on my Mac. I can view the webpage's HTMl and CSS and run the javascript functions in browser on my computer, but the next step I want to take is incorporating python scripts for accessing a MySQL database and returning results.
I am clearly new to this, and would love some guidance. Right now, on my computer, I have MySQL installed and I can run it in the terminal just fine. What else do I need as far as database and server equipment – if anything – to get some dynamic website running locally? My current, albeit incredibly limited, understanding is that I have a MySQL database stored on my machine that can be accessed through a Python script – also on my machine – and a link to this script in the HTML file. Is this even right, or do you recommend certain tutorials to fill in the gaps or teach me from the ground up?
I am sorry I am asking a lot; the few tutorials I have found have seemed to cover what I am hoping to do. Many thanks in advance.
Here you go. https://docs.djangoproject.com/en/1.4/intro/install/
Just follow the installation guide, and you'll be up and running in no time.
If you have MySQL installed on your machine along with Python, get a version of MySQLDb library for Python and have fun with it. Moreover, you can do almost any data operation with these combinations. If you want your website to go live (and do not wish to go through web frameworks) just look for a hosting plan that gives you a Python installed server access.

Deploying Django on an apache server

I am new to web development. So be gentle. AND thanks in advance.
I am developing on windows env. and deploying on a linux server w/ Python 2.6.2 installed.
Running apache2.2 as Virtual Host, and I am using mod_wsgi. I plan to serve media files from the same Virtual Host.
I have a django site and I am now ready to deploy. I am stuck, and every site I go to seems to be outdated/incomplete/overmyhead.
https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
http://www.djangobook.com/en/2.0/chapter12/
...only 2 links as for the newbness
The top link seems to be what I need yet I am still confused on these things:
What does the file structure look like on the server
I cannot change/edit server files myself, I rely on the dba for that
I have django.wsgi, and django.wsgi~, where do those go?
Where do I put my project in relation to those wsgi files?
The httpd.conf file is something that the server has on it? or do I create another?
Do I need to put django in any way shape or form on the server? If so where? And what about the packages like registration, defaults?
Again sorry for the newbness, I have been banging my head for 2 weeks on this.
Any help/links will be greatly appreciated unless they link me to the django-docs. I have read those...A LOT! thanks
Also go read:
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
and watch:
http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations
The latter includes Django examples and talks a bit about locations, permissions etc.
The first of these is even linked to in the document in the Django documentation.
It doesn't matter where the files go. They just have to be readable/executable by the user that the web server is running under.
I don't know what you mean by django.wsgi~, that sounds like a backup file created by your editor - you don't need that.
Yes the httpd.conf is the configuration file for Apache. Some distributions (eg Debian and Ubuntu) split this up into separate files for each site that the server runs. If your administrator is the only one who can edit files, he will know about this already.
Yes, you need Django, and any third-party packages.
#Nathan
An easier option for you while you are learning this is not to really have to many expenses.
I could also suggest you take a look at Heroku - allows you to easily deploy your applications in minutes.
Up until recently they only supported RoR and they have brought in support for Django and Python - they have some really well documented tutorials as well.
I hope this helps
Heroku Django / Python tutorial
I have written up an simple deployment guide for django applications it can be found here. It goes all the way from project setup and deployment. I also have references setup. I honestly believe it answers all your questions, I would give it a look.
Goodluck.

Integrating Django with Amazon's Database 'SimpleDB'

Can somebody guide me to develop a django app with SimpleDB(Amazon's Database) as its database. I couldnt find any tutorials on searching. Can somebody help me by explaining the process involved in integrating Django with SimplDB for creating a small application. Or if somebody have any tutorials for it, please share it with me. Any help would be appreciated.
There is now experimental support using django-norel with the django-simpledb backend.
It doesn't look like there's any way to use Django's ORM with SimpleDB at the moment, unless you want to write all the code yourself. I'd suggest interfacing with SimpleDB using normal Python code (which would get called by your views or however you wish to do it).
To do this, use boto. It's mature, stable and well-documented -- I used it quite successfully in a Django project I recently undertook.

Categories