ajax philosophy

34 views
Skip to first unread message

Aaron Reabow

unread,
Feb 12, 2015, 8:17:02 AM2/12/15
to django...@googlegroups.com
I would like to separate out my ajax requests into their own views (one per page, is what I am thinking)

This allows me to keep a very generic base view that applies to multiple pages.  This have a number of advantages for me, such as building a bullet proof view that never gives any trouble :)

Really what I am asking is - from a conceptual level, are their any serious reasons why this approach would be a bad idea?

(I am just taking my first steps into the world of ajax, hence the beginner question)

Avraham Serour

unread,
Feb 12, 2015, 9:37:36 AM2/12/15
to django...@googlegroups.com
in my opinion no, it actually makes sense to have an API with its own routes and views.

I suggest you take a look at tastypie or DRF

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f714b07b-ad69-4e60-8ce4-3cc73cc85cea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron Reabow

unread,
Feb 12, 2015, 11:01:22 AM2/12/15
to django...@googlegroups.com
Okay great, thanks.

I wrote a basic view, and it seems to do the job.  So far so good :)

I know (of) DRF, but not tastypie - will have a look.

thanks again for the help
Reply all
Reply to author
Forward
0 new messages