Yep, the URL can be anything. Check out https://docs.djangoproject.com/en/1.7/topics/class-based-views/generic-editing/#ajax-example for an example using CBV's. For the API call, you won't end up rendering any html, just returning an HTTPResponse object and perhaps some data, likely in JSON format.
You can also look at Django-braces, which provides mixins for handling AJAX, or Django-rest-framework or Django-tastypie for API handling. -James On Jan 9, 2015 4:32 AM, "Tobias Dacoir" <falc...@gmail.com> wrote: > Thanks for the answer. I will implement an AJAX call to another url / view > than. This I should be able to figure out using a Button and Google. > The URL can be anything like /settings/autoplay/. The view just has to > update the property (user object should be in the request already). > However, what should the view return? > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@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/40792af2-c49c-4a65-9635-2f190b3f4a61%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/40792af2-c49c-4a65-9635-2f190b3f4a61%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/CA%2Be%2BciUuM1idV3vDDpNuBdHPAREMA9CaxMLVSwDEeUM3tji3JA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.