-
Notifications
You must be signed in to change notification settings - Fork 1
A sample application how to use dojango with other reusable apps
klipstein/dojango-sample
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
dojango-sample ============== A sample application how to use dojango in combination with other reusable apps. The following apps are used: - dojango: https://dojango.googlecode.com/svn/trunk/dojango: Used for integrating the Dojo Toolkit - sandoval: http://github.com/streetcleaner/sandoval: We use this app for having a model and data, we want to show - django-uni-form: http://github.com/pydanny/django-uni-form For better and easier form displaying. - django-treebeard: http://code.tabo.pe/django-treebeard/ Used for showing the capabilities of the TreeStore. - django-piston: http://bitbucket.org/jespern/django-piston For creating our own JSON-Rest-API that is used in conjunction with the models from sandoval. Installation: ------------- It is required, that you have installed Python >= 2.5, Django >= 1.1 and PIL (Python Imaging Library) before! 1. Installing used reusable apps 2. Creating the database 3. Loading data into the database 4. Copying image data to an accessible place 5. Starting the server and see it in action 1. Installation of reusable apps -------------------------------- For this installation you need to install SVN, GIT and MERCURIAL before. Alternatively you can download the various packages directly from the above mentioned websites and place them within the "external_apps" directory. cd [dojango-sample-dir] cd external_apps svn export https://dojango.googlecode.com/svn/trunk/dojango svn export http://django-tagging.googlecode.com/svn/trunk/tagging git clone git://github.com/pydanny/django-uni-form.git ln -s django-uni-form/uni_form . git clone git://github.com/streetcleaner/sandoval.git ln -s sandoval/movie . hg clone http://code.tabo.pe/django-treebeard/ ln -s django-treebeard/treebeard . hg clone http://bitbucket.org/jespern/django-piston ln -s django-piston/piston . 2. Creating the database ------------------------ cd [dojango-sample-dir] python manage.py syncdb Just enter the requested information for creating an initial django user. 3. Loading data --------------- cd [dojango-sample-dir] python manage.py loaddata post # loading sample-data for the tree python manage.py loaddata movies # loading some sample movies python manage.py loaddata feeds # loading some information, where to get new movies from 4. Copy image data ------------------- cd [dojango-sample-dir] tar xzvf external_apps/movie/fixtures/images.tar.gz 5. Start the server ------------------- cd [dojango-sample-dir] python manage.py runserver This starts the internal django development server and the application will then be available from here: http://localhost:8000 Enjoy! Play with dojango ================= For further details visit: http://code.google.com/p/dojango/wiki/DojoBuild Doing a Dojo build ------------------ 1. Get a dojo source release 2. Do a dojo build 3. Enable that build for your dojango project 1. Get a dojo source release ----------------------------- This is fairly simple, because downloading a specific version of Dojo is integrated into manage.py: cd [dojango-sample-dir] python manage.py dojoload Starts a dojo download of the version, that was defined within DOJANGO_DOJO_VERSION (should default to the latest) and places it into: [dojango-sample-dir]/dojo-media/src/[DOJANGO_DOJO_VERSION] Of course you now can develop your project using the Dojo source release by enabling it in your settings.py: DOJANGO_DOJO_PROFILE = "local" # defaults to the latest version, but can be any version # that is available within src-folder # DOJANGO_DOJO_VERSION = "1.4.0" 2. Doing a dojo build ---------------------- Also the starting of a dojo build is integrated into manage.py and this project has an already setupped build profile defined, so you just have to call: cd [dojango-sample-dir] python manage.py dojobuild Afterwards there will be built version here: [dojango-sample-dir]/dojo-media/release/[DOJANGO_DOJO_BUILD_VERSION]-dojango-with-dojo 3. Enabling that build ----------------------- After the build you are able to switch the Dojo environment of your whole project to it. For that you just have to manipulate your [dojango-sample-dir]/settings.py: DOJANGO_DOJO_PROFILE = "local_release" DOJANGO_DOJO_VERSION = "[DOJANGO_DOJO_BUILD_VERSION]-dojango-with-dojo" If you now reload the initial page on http://localhost:8000 it will require less JavaScript files.
About
A sample application how to use dojango with other reusable apps
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published