|
GettingStarted
Help - How to install, setup and get the dojango test page running - in only two steps!
IntroductionDojango is a reusable django application that helps you to use the client-side framework dojo within your django project. It provides capabilites to easily switch between several dojo versions and sources (e.g. aol, google, local) and delivers helping utilities, that makes the development of rich internet applications in combination with dojo more comfortable. Also it makes the building of your own packed dojo release easier. Another goal of this project is, that you can learn how you have to structure your html to use dojo within your projects. Start your first dojango driven django projectThis section describes, how you integrate dojango on the basis of a newly created django project. Django with at least version >= 1.0 must be installed before to run dojango successfully. Details how you install django can be found here: http://www.djangoproject.com/download/ http://www.djangoproject.com/documentation/install/ Start an empty projectType the following on your console to create an empty django project: django-admin.py startproject mysite 1. Add dojango as app to your projectDownload the dojango-xxx.tar.gz from the google code page and place it in your previously created django project directory and extract it there: cd mysite tar xzvf dojango-xxx.tar.gz You could also use an actual subversion checkout from googlecode and place it in your mysite directory: cd mysite svn checkout http://dojango.googlecode.com/svn/trunk/dojango After that you can enable the dojango app by defining the following in your project's settings file (mysite/settings.py): INSTALLED_APPS = (
...
'dojango',
)2. Enable the dojango URLsTo deliver the media files you also have to add the URL definitions of dojango to your main URL defintion file (mysite/urls.py): urlpatterns = patterns('',
...
(r'^dojango/', include('dojango.urls')),
)Consider, that if you want to set a different base pattern than ''dojango'', you should also modify the DOJANGO_BASE_MEDIA_URL setting. Now you are ready to start your django server: ./manage.py runserver Open the dojango test page: http://localhost:8000/dojango/test/ And enjoy dojo :-) |
Sign in to add a comment
Hi. Im only a newbie in web development, im just starting. I tried to follow your instructions and i have this error:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/urlresolvers.py" in resolve- 2. sub_match = pattern.resolve(new_path)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/urlresolvers.py" in resolve- 2. sub_match = pattern.resolve(new_path)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/urlresolvers.py" in resolve- 8. return self.callback, args, kwargs
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/urlresolvers.py" in get_callbackI want to do the test. Can you help me?
Thx
please use django version >= 1.0
You should add some screenshots for the results, this would be better for your visitor.
Nice app.
Congratulations for your work. I wrote a small French tutorial to install and use Dojango. Adress: http://gilles-dubois.developpez.com/info/django/ Fill free to give this reference for French speaking readers if you think it can help.
Thanks for your work... Very very nice... There´s some place that we can get more help ?
Thanks
This is great, CONGRATULATIONS AND THANKYOU!
Great work.
Hi, i have recibe one error http://dpaste.com/97948/
Hi bro,
I got some error. Please your help .. Request Method: GET Request URL: http://localhost:8000/my-first-page/ Exception Type: TemplateSyntaxError? Exception Value:
Caught an exception while rendering: 'module' object has no attribute 'appengine'
Exception Location: /usr/lib/pymodules/python2.6/django/template/debug.py in render_node, line 81 Python Executable: /usr/bin/python Python Version: 2.6.4 Python Path: '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0', '/usr/local/lib/python2.6/dist-packages'? Server time: Mon, 2 Nov 2009 20:53:07 -0600 Template error
In template /home/robin/Desktop/dojango/mysite/dojango/templates/dojango/base.html, error at line 35 Caught an exception while rendering: 'module' object has no attribute 'appengine' 25 {% block dojango_dojo_styles %} 26 <style type="text/css"> 27 @import "{{ DOJANGO.DOJO_URL }}/resources/dojo.css"; 28 @import "{{ DOJANGO.THEME_CSS_URL }}"; 29 </style> 30 {% endblock %} 31 <script type="text/javascript"> 32 {# baseUrl setting is needed, if you want to combine a local with a remote build! #} 33 {% block dojango_dj_config %} 34 var djConfig = { 35 'isDebug':{{ DOJANGO.DEBUG|json }}, 36 'parseOnLoad':true, 37 'baseUrl':"{{ DOJANGO.DOJO_BASE_PATH }}" 38 {% if not DOJANGO.IS_LOCAL %} 39 ,'dojoBlankHtmlUrl':"{{ DOJANGO.BASE_MEDIA_URL }}/resources/blank.html" 40 ,'dojoIframeHistoryUrl':"{{ DOJANGO.BASE_MEDIA_URL }}/resources/blank.html" 41 {% endif %} 42 {% if DOJANGO.CDN_USE_SSL and not DOJANGO.IS_LOCAL %} 43 ,'modulePaths':{'dojo': '{{ DOJANGO.DOJO_URL }}', 'dijit': '{{ DOJANGO.DIJIT_URL }}', 'dojox': '{{ DOJANGO.DOJOX_URL }}'} 44 {% endif %} 45 };
Hi all I have encountered the same problem as described by robinson.ceng here above. I have analysed it and here are my findings: This started when I upgraded from ubuntu 8.10 to 9.10 this line in dojango/templates/dojango/include.html causes this: 'isDebug':{{ DOJANGO.DEBUG|json } the file dojango/util/init.py contains the code for the json filter and in that file this can be found: This import statement succeeds now because a part of ubuntu 9.10 is the package "python-protobuf" drawn in by the ubuntu-one client. And this package contains a "google" module which obviously is not compatible with the one expected by the dojango code. A dirty fix is to change the above try: import block to simple "google=None" statement. If the python-protobuf is removed from the system, dojango works fine.
The problem with the google import should be fixed within dojango 0.4.5.
I confirm the google import is fixed by dojanga 0.4.5, reinstalled ubuntuone client and my django application works fine with dojango now.