Skip to content

Instantly share code, notes, and snippets.

@paridin
Last active September 14, 2015 16:48
Show Gist options
  • Save paridin/5fa5188b16e0da88fe00 to your computer and use it in GitHub Desktop.
Save paridin/5fa5188b16e0da88fe00 to your computer and use it in GitHub Desktop.
Comienza a desarrollar profesionalmente con django en 10 pasos.

MAC OSX

1.- instalar brew, seguir los pasos de http://brew.sh/

2.- instalar python en su versión 3 apoyada por brew brew install python3

3.- instalar en la instancia de python 3 virtualenv y virtualenvwrapper

pip3 install virtualenv
pip3 install virtualenvwrapper

4.- configurar el profile para correr virtualenvwrapper

VIRTUALENVWRAPPER_PYTHON=/usr/local/Cellar/python3/3.4.2_1/bin/python
#VIRTUALENVWRAPPER_PYTHON=/usr/local/Cellar/python3/3.4.3/bin/python3
#valida que la ruta corresponda a tu instalación
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel/python
source /usr/local/bin/virtualenvwrapper.sh

5.- Crear los directorios donde se crearan las instancias virtuales y donde se trabajaran los proyectos mkdir -p $HOME/.virtualenvs $HOME/Devel/python

6.- Crear tu projecto mkproject project_name

7.- Instalar Django pip install django

8.- Ir un directorio atrás y borrar el directorio de nuestro proyecto con la finalidad de usar el mismo nombre como el proyecto de django

cd ../ ; rm -rf project_name ;
django-admin startproject project_name

9.- Regresar al directorio anterior. cd -

10.- Ejecutar nuestro servidor de prueba. python manage.py runserver

¡Completo!, Felicidades estas listo para desarrollar.

Linux

Python 3.4

Instalar python 3.4, el siguiente script hará por ti los pasos del 1 al 5, ver el código fuente.

wget http://bit.ly/install_py3_4_3 -O install_py3.4.sh
bash install_py3.4.sh
source ~/.bash_profile

6.- Cargar la configuración creada y Crear tu projecto

source ~/.bash_profile
mkproject project_name

7.- Instalar Django pip install django

8.- Ir un directorio atrás y borrar el directorio de nuestro proyecto con la finalidad de usar el mismo nombre como el proyecto de django

cd ../ ; rm -rf project_name ;
django-admin startproject project_name

9.- Regresar al directorio anterior. cd -

10.- Ejecutar nuestro servidor de prueba. python manage.py runserver

¡Completo!, Felicidades estas listo para desarrollar.

Contribuidores

Roberto Estrada

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment