GithubHelp home page GithubHelp logo

klipstein / dojango-sample Goto Github PK

View Code? Open in Web Editor NEW
18.0 5.0 1.0 828 KB

A sample application how to use dojango with other reusable apps

Home Page: http://code.google.com/p/dojango/

Python 100.00%

dojango-sample's Introduction

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.

dojango-sample's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

dotfeng

dojango-sample's Issues

ImportError at /

Hi,

I did everything step-by-step from manual but I have an error:

No module named dojango-sample.urls

Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.4.1
Exception Type: ImportError
Exception Value:
No module named dojango-sample.urls
Exception Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.7.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.