A website I made for myself to test different technologies and shows some of the projects I have worked on.
This website is under development, to see the current state of the site you can see the deployment in Heroku at the following url
https://grp-portfolio.herokuapp.com
For this project you will need python 3.4.x installed on your computer. You can download the python installer here.
Note: Depending on your Operating system, you may have python already installed.
To check if you have python installed, you can try the following in the command line.
$ python
This will get you to the python shell and it also provides the python version that's installed.
This is not necessary, but it is highly recommended. A virtual environment is a place where you can work separately from your global environment and install everything you want and never affect your global environment.
To do this in python, you can install virtualenv
with easy_install
or pip
. We recommend pip
.
$ pip install virtualenv
To create a virtualenv
, select a folder where you want to work with the project and do the following:
$ virtualenv venv
That will create a virtual environment for python. To activate it do the following:
$ source venv/scripts/activate
Before installing the python dependencies, you will need to install postgresql and add the bin path to your environment.
Fist execute this command in order to install psycopg2 for windows
$ easy_install http://www.stickpeople.com/projects/python/win-psycopg/2.6.1/psycopg2-2.6.1.win32-py3.4-pg9.4.4-release.exe
Now that you are in your venv, let's take care of project dependencies.
In the command line, go to the projects root folder and do the following:
$ pip install -r requirements.txt
This project uses environment variables to keep secret settings secret. To get started, you would need to copy the example.env
file to a new file called .env
in the same directory.
$ cp example.env .env
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver_plus
Go to http://localhost:8000/admin
in your browser and enter your credentials.
This project uses React for the frontend make sure to do the following steps, if you wish to change something on the frontend.
If you wish to make development on the frontend, open another terminal window and do the following:
- Make sure you have the latest version of node and npm installed. I recommend nvm [https://github.com/creationix/nvm] (https://github.com/creationix/nvm).
- Install webpack globally
npm install -g webpack webpack-dev-server
- Go into the client directory
cd client
- Run
npm install
Run the dev-sever with hot-reloading with the following command:
$ npm start
To have a production ready frontend just run the following command
$ npm run build
This will create an production ready app.js
file and copy all of the static files into django /static/
directory.