Roy Tang

Programmer, engineer, scientist, critic, gamer, dreamer, and kid-at-heart.

Blog Notes Photos Links Archives About

Starting out

The quintessential app to learn from is of course a blog.

Started using a simple Post model. Added the new post form and view. Can now successfully insert posts into the DB.


– create the detail page that will show the post after saving

Figure out:

– when redirecting, how can I make the redirect URL decoupled from the of the parent app?

i.e. if the parent app has the following mapping:

β€˜^blog/’ -> pass to blog.urls.urlpatterns

the blog app has mappings for

β€˜^post/new/’ -> new post

β€˜^post/([A-Za-z-])/’ -> post detail

inside the view, I want to redirect to “post/”, but with respect to the app, it should be “blog/post/”

I should subscribe to one of the Django mailing lists to ask stuff like this.


Hey Roy!

Good to see another pinoy interested in django. (You might want to join the google group of pinoy django users)

About your problem, you might want to take a look at this.