Search code examples
pythondjangovs-web-application-project

A list of everything I need for running my app on a web server


What I want to know are actually 2 things.

Part 1:
I have a developed source code for an application in python that uses Django framework. What I want is to be able to run the code on a developer machine and see the result. What do I need for it? (my guesses): Python development enironment (Eclipse/PyDev/Aptana Studio 3 seem to be the better ones for windows not sure linux yet),
I also have a postgre database already setup (I know there's a file where I have to specify connection information)
- something installed from django or would this be already included in the code that I have?

Part II:
I also want to make a dev server accessible through internet.
- this is the major part of the question and the most important. How do I publish the app?
- I have a linux machine that I would do this on, but unsure of all the things I need. Apache server?


Solution

  • To answer your questions:

    • What you need: A list of requirements and instructions to get started with Django is available here: http://djangobook.com/en/2.0/chapter02/.

    • Database: that chapter also includes a section on configuring access to your database, with a specific section on postgreSQL.

    • Dev server: To start a basic development server, see this tutorial section

    • Deploying django (production): For instructions on how to deploy Django for production, see chapter on deploying Django.

    • Publishing on internet: as for making your dev server accessible through the internet, ask on https://serverfault.com/. Make sure you provide more information about your network setup, what you've tried, what isn't working, etc. (Briefly, you need to make sure that the host you are running your server on is on a publicly accessible IP, or has port 80 forwarded to it from such a host. If in doubt, speak to your sys/network admin if you have one. Or use a django hosting service such as those listed on http://djangohosting.com)

    • IDE : Regarding IDE, it's down to personal preference. What you mentioned are fine and can run on Linux too.

    As a first step, I suggest you follow the tutorial which guides you through the process of starting a development server and developing a basic app.

    Even if your goal is to deploy an existing app, the tutorial will give you an idea of how the different components work together (apps, models, urls, templates, etc) which will help with debugging when something goes wrong with your deployment.

    Good luck.