Django & ajax & HATEOAS: how to reverse urls in javascript (not)

This is the second article about reversing urls in javascript. The previous article actually presented a bad idea. Github API v3 Github’s API is undubitably quite suprising for a web developer that isn’t aware of the HATEOAS concept, here’s the kind of things you can see for example: [ { "updated_at": "2012-11-27T14:42:24Z", "svn_url": "https://github.com/yourlabs/django-cities-light", "language": "Python", "milestones_url": "https://api.github.com/repos/yourlabs/django-cities-light/milestones{/number}", "downloads_url": "https://api.github.com/repos/yourlabs/django-cities-light/downloads", "subscription_url": "https://api.github.com/repos/yourlabs/django-cities-light/subscription", "teams_url": "https://api.github.com/repos/yourlabs/django-cities-light/teams", "full_name": "yourlabs/django-cities-light", "git_url": "git://github.com/yourlabs/django-cities-light.git", "git_tags_url": "https://api.github.com/repos/yourlabs/django-cities-light/git/tags{/sha}", "owner": { "login": "yourlabs", "organizations_url": "https://api. [Read More]
http  hateoas  api 

Django & ajax: how to reverse urls in javascript (not)

IMPORTANT UPDATE: the approach proposed in this article is bad. Read this one instead.

You can start building a user interface using Django’s awesome CRUD in a matter of seconds, for example with just this server side configuration:

    url(delete/(?P<pk>\d+)/$', 
        generic.DeleteView.as_view(model=YourModel),
        name='yourapp_yourmodel_delete'),
[Read More]
ajax  django  http  api