You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Vagrant-Python-Django VM
2
2
3
3
A Vagrantfile utilizing Ubuntu 14.04/Trusty to get you started with self-contained Python/Django projects quickly via VirtualEnv.
4
-
Create contained environments within the VM via `. init_python_env`
4
+
Create contained environments within the VM via `init_python_env`
5
5
6
6
## Installation
7
7
#### Prerequisites
@@ -13,17 +13,17 @@ Create contained environments within the VM via `. init_python_env`
13
13
14
14
#### Logging Into Your VM
15
15
-`vagrant up` to setup and initialize the VM. ( only the first time you run `vagrant up` will take long 5-10 mins )
16
-
- After the VM is initialized, run `vagrant ssh` and then `sudo su` to login as the root user.
16
+
- After the VM is initialized, run `vagrant ssh`
17
17
- change the current directory to your projects root by typing `cd $WORKON_HOME`
18
18
19
19
#### Create a Contained Python Environment
20
-
`. init_python_env`**(Notice the preceding period!)**Django install is optional.
20
+
`init_python_env`. Installing Django is optional.
21
21
22
22
#### Setup PgAdmin Web interface (phpPgAdmin)
23
23
`setup_phppgadmin`
24
24
25
25
#### Setting Up a New Database For A Django Project
26
-
`manage_django_db`. Switch to a Django Project Folder before running. This will create a new user, alter their role, create a new database, and assign them to a DB. If you just want to assign roles and not create new users/DBs, that works too. Running this command will also automatically update the django `settings.py` file for your project. ** CURRENTLY ONLY SUPPORTS POSTGRESQL ** More DBMS will be added in the future.
26
+
`manage_django_db`. **Switch to a Django Project Folder before running**. This will create a new user, alter their role, create a new database, and assign them to a DB. If you just want to assign roles and not create new users/DBs, that works too. Running this command will also automatically update the django `settings.py` file for your project. ** CURRENTLY ONLY SUPPORTS POSTGRESQL ** More DBMS will be added in the future.
27
27
28
28
## Notes to User:
29
29
- The default settings will run Django on port 80
@@ -33,13 +33,13 @@ Create contained environments within the VM via `. init_python_env`
33
33
- Defaults to latest stable version PostgreSQL
34
34
- Default settings run Apache on port 8080, needed for phpPgAdmin web interface.
35
35
- To change the port(s) Apache runs on edit the following:
-`sudo vim /etc/apache2/sites-available/000-default.conf`
38
38
- Then restart Apache `sudo /etc/init.d/apache2 restart`
39
39
40
40
## Usage
41
41
- VirtualEnv is _not_ a VM container, it is simply to create self-contained python environments. Think of it as a sandbox, not a full fledged VM. Plus, we already have the VM!
42
-
-`cd` into the synced_folder and run the command `. init_python_env` to create a new Python Environment so projects/packages are contained. **All python environments will be initialized in the synced_folder (`/vagrant/www/` by default). Notice the preceding period.**
42
+
-`cd` into the synced_folder and run the command `init_python_env` to create a new Python Environment so projects/packages are contained. **All python environments will be initialized in the synced_folder (`/vagrant/www/` by default).**
43
43
- Be aware that self-contained Python Environments does ***NOT*** mean self-contained Database Environments. Future releases may take this into account through porting.
44
44
- Run `python -V` and `django-admin --version` to make sure everything checked out.
45
45
- run `deactivate` to exit virtualenv environment or `workon [PROJECT_NAME]` to activate it. Alternatively, whenever you navigate into a project folder, the virtual environment will become activated.
0 commit comments