Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Setting Up Django:
- The commands and tools necessary to set up the Django Web Framework on an Ubuntu 14.04 system. Things like the initial download, setting up a remote Git repository, and Bootstrap are covered.
- Install the following packages globally, as well as making sure you have the latest version of pip.
- $ sudo apt-get install python3-pip git mariadb-server
- $ pip3 install --upgrade pip
- $ sudo pip3 install virtualenv
- Create a coding directory, and set it up
- $ mkdir ~/project/
- $ cd ~/project/
- $ virtualenv --no-site-packages -p python3 env
- $ git init
- # Activate (start using the virtualenv)
- $ . ./env/bin/activate
- # Check you are using the virtualenv python with "which python"
- # Make sure you have the latest pip!
- $ pip install django
- $ pip install mysqlclient
- # Create the initial requirements file
- $ pip freeze > requirements.txt
- # Now Actually create the Django project, then the app.
- $ django-admin startproject mysite
- $ cd mysite
- $ ./manage.py startapp siteapp
- # Set up git and the remote git repository
- $ git config --global user.name "Timothy Pulliam"
- $ git config --global user.email "[email protected]"
- $ git config --global core.editor vim
- $ git config --list
- # Create a remote repository on Github.
- $ git remote add origin https://github.com/Timothy-Pulliam/mysite
- # Now would be a good time to commit the initial state of the project.
- $ git add .
- $ git commit -m "Initial Commit for mysite and siteapp"
- $ git push origin master
- # Install Bootstrap files into your app's static directory
- http://pastebin.com/edit/M0ma6L5J
- # The last thing we need to do is set up the data base engine Django will use for the back end. Django
- # Uses Sqlite3 by default, however this is not entirely scalable so we will be using MariaDB (FOSS fork of MySQL).
- # For information on how to do this, see the following link,
- https://github.com/Timothy-Pulliam/Notes/blob/master/Django%20Notes/database_setup
Add Comment
Please, Sign In to add comment