wd_django_bootstrap /

Filename Size Date modified Message
setups
supporting
107 B
2.3 KB
4.6 KB
3.8 KB
1.3 KB

Intro

The idea behind this project is to fork this repo when you are starting a new Django app, then go to town customizing it. It will include normal base Wilcox Development Solutions tools for creating Django apps.

Booting Up The Project

$ paver paver.virtual.bootstrap
$ python bootstrap.py
# (coffee time now, it'll take a minute...)

$ source virtual-env/bin/activate
$ django-admin.py startproject YOUR PROJECT

This will also install a paver wrapper over manage.py. You can delete this or use this, whatever.

Now configure your django project for all the apps that came in, by:

$ `paver update_paver_with_git_support`   # updates your paver to one that has (rudimentary) git support
$ paver setup_project YOURPROJECT

What this gives you after you setup_project (and things to configure)

  1. Set up your database information in `user_setup.py
  2. Set up templates/base.html with your general site layout

TODO

Pull this setups and supporting framework out so others can use it. (wd_django_bootstrap is very much considered a test bed for a reusable framework)

Because ultimately I'd like to hook it up to my Turbogears work too

TODOs for that

Rethink how tasks are registered. Feels like too much boilerplate going on to create a simple task.

Troubleshooting

If you get odd errors like:

$ python bootstrap.py          
New python executable in venv/bin/python
ERROR: The executable venv/bin/python is not functioning
ERROR: It thinks sys.prefix is '/System/Library/Frameworks/Python.framework/Versions/2.6' (should be '/Users/aias/Development/HgBased/wd_django_bootstrap/venv')
ERROR: virtualenv is not compatible with this system or executable

Please do two things:

  1. Make sure you're running the latest virtualenv (1.5.1, of this writting)
  2. If you're using a non system Python as your standard Python (which python to check) Forcefully use the System supplied one.

    Instead of python bootstrap.py use /usr/bin/python2.6 bootstrap.py

Credits

  • http://blog.carduner.net/2009/09/09/django-and-paver/
  • http://www.agmweb.ca/blog/andy/2222/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.