Wednesday, April 27, 2011

Re: Javascript frameworks with Django

I'm not sure I completely understand your question, but let me provide
an answer and maybe that'll get us started on the right track.

For the dynamic parts of the application, you could absolutely use
django and view methods/classes to return json/xml or whatever data
format you use. The data can then be rendered by your front-end JS
code. You probably won't need the django templates unless you're
formatting data a certain way.

Your static code (you mean static media like javascript, css, and
images, right?) should ultimately be served by a different server,
specifically set up for static content (see the django docs... they
mention this). To implement the static URL, use either the
'staticfiles' app for django 1.2.x or use the built in static files
for django 1.3.

HTH

On Apr 27, 12:50 am, Jani Tiainen <rede...@gmail.com> wrote:
> Hi,
>
> I've been for a while been using ExtJS and Dojotoolkit. Specially very
> recently released ExtJS 4 brought lot of interesting features including
> loading on demand (Dojotoolkit had it for a good while).
>
> Now I'm facing good practice problem:
>
> I want to construct apps that relies pretty much solely on "web 2.0"
> technologies, namely to rewrite desktop apps in a web.
>
> There comes the "problem". To make things work smooth browser side javascript
> code needs to talk to Django views and to make that happen I need to get URLs
> working (and later on translations).
>
> How to make all that work together well? I mean where to put dynamic parts,
> where to put static parts and at some day - translations.
>
> Should I mix and match templates and plain static javascripts? One problem
> that I've been facing (though 1.3 probably fixed it) was resources from
> different apps, specially static js parts.
>
> --
>
> Jani Tiainen

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate