简体   繁体   中英

setting up Django for internal web server ( from window to linux ) , what exactly do I need to install ?

I'm the beginner. I'm trying to deploy Django app to the internal web-server that is control by admin. The apache linux box with python 2.6 installed , but I am using 2.7 - on windows - other than following settings from http://www.djangobook.com/en/2.0/chapter12.html

My question is , what are the installations that I have to ask the admin to install in the linux box ?

  1. Install Django following https://docs.djangoproject.com/en/dev/topics/install/ ?
  2. Python version : remove 2.6 and replaced with 2.7 python ? <- does it necessary ?
  3. What about all the packages ? For example I use pandas. I usually do

    "pip install pandas"

    on my windows, do I need to ask admin to install that as well ?

If I don't use Django , but normal html - I usually just FTP to

/virtualhosts/mycompany.com/reports/www/index.html

and I would be able to see it. For Django I have >

mysite1/
    manage.py
    mysite2/
        __init__.py
        settings.py
        urls.py
        wsgi.py

Do i upload all mysite1 to replace index.html ( /virtualhosts/mycompany.com/reports/www/ ) ?

Sorry i am truly beginner here.

You should ask admin to install virtualenv so you will be able to install everything else on your own. Anyway you will have to get ssh access to server to be able run your projects, so ask admin for it.

  1. To install Django you just pip install django and you will get latest version
  2. Python 2.7 is not necessary, but desirable since you might face problems on 2.6 like some modules you install might not be supported by 2.6 version
  3. If you've followed official tutorial, yu should have been created requirements.txt in your projects, just find this file and send it to your admin, asking him to pip install -r requirments.txt . If not - you should read about this file cause it kind of must-have in project.
  4. FTP upload - yes, you have to upload whole folder mysite1 I recommend you check out this thing, cause it is very easy and useful, especially if admin will help you to install it virtualenv wrapper

Edit: also consider installing Ubuntu alongside with Windows(it has such option out-of-box) You will fall in love with it for sure and will not be willing to return on Windows(except to play games if you do)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM