Wearing dice on my head since 2008 Programmer, engineer, scientist, critic, gamer, dreamer, and kid-at-heart. Randomly amazed.

Starting out

· Read in about 1 min · (178 Words)
Categories: Software Development | Tags: royondjango

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.

Next:

– 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 urls.py 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.

Comments

Comment by Tim Medina on 2008-10-20 08:46:00 +0000

Hey Roy!

Good to see another pinoy interested in django. (You might want to join the

[google group of pinoy django users][1])

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

[Tim][3]

[1]: http://djangoph.com

[2]: http://docs.djangoproject.com/en/dev/topics/http/urls/#reverse

[3]: http://devblog.timmedina.com/

Comments