Sunday, May 8, 2011

Django-manager

Hi there,

Today's topic - django-manager. This app were created because recently I needed to create couple django projects from scratch, and that wasn't fun.
So decision was - to create some app, that will have just simple "create project" script, and it will done all stuff, that I need to do, before and after standard "django-admin.py startapp".

Plus, one time I faced problem, that I haven't root access, so I can't install any application (like django) at all. So django-admin doesn't need to install at all/
So, lets start from start :)
1) Install django-manager from https://ilblackdragon@github.com/ilblackdragon/django-manager.git
git clone git+https://ilblackdragon@github.com/ilblackdragon/django-manager.git

2) Go to django-manager folder and run create_project.py
cd django-manager/
./create_project.py your_project_name [path/to/project]

This will create:
- Virtual environment for your project
- Create project folder for new django project
- Create new project with some stuff already made:
- apps/ folder - for your django applications
- apps/auth_ext - contains code for profiling, and you can change it whatever you want
- deploy/ - folder for your deploy scripts, requirements.txt, etc
- developer/ - place for scripts (for start update.sh & update.bat scripts)
In requirements.txt you'll find: django, mysql-python, south, django-misc, django-uni-form and some other useful python libraries.
Configured urls and settings for work with admin and auth_ext.
- Create git repository in project directory, and commits changes.

Plus, when I'll issue update of django-manager (and I'll), you can update you project by using update_project.py:
./update_project path/to/your_project

This will apply patches, that I'll create if I'll make any changes.

Personally, I'm not recommend Windows users to use virtual environments. That is why I'll shortly add keywords for create_project to disable virtual environment and git work.

PS Use Linux for your python\django development - it rulezzz ;)

No comments:

Post a Comment