Try Django 1.9 – 18 of 38 – Dynamic Url Routing & Patterns

Video is ready, Click Here to View ×


Try Django 1.9 – 18 of 38 – Dynamic Url Routing & Patterns

** Try Django 1.9 ** is an introduction to Django version 1.9 by creating a simple, yet robust, Django blog. This series covers a variety of Django basics as well as Django 1.9 specific material. Learn more about the Django Web Framework here:

Subscribe to our channel:

Generally the topics will include:
– Django Project Setup
– Class Based Views (& some Function Based…

19 Comments

  1. I AM getting this error ( 'list' object has no attribute 'title')
    my code is like this
    instance = get_list_or_404(Post, id=1)
    context = {
    "title": instance.title,
    "instance": instance,
    }
    i have included Post also
    Please help @CodingEntrepreneurs

  2. Ok guys, if you have problems with regex, regular expressions like I do you can use this website https://regex101.com/ At least for me it helps a lot. You can actually learn from that website. Recently I developed some web scrapping bot with Python and regex part was a nightmare for me :/

  3. Hi, As soon as i do change id=None to id & instance = get_object_or_404(Post, id=id) i get error please help error is below:

    ValueError at /posts/6/

    invalid literal for int() with base 10: '6/'

    Request Method: GET
    Request URL: http://127.0.0.1:8000/posts/6/
    Django Version: 1.9
    Exception Type: ValueError
    Exception Value:

    invalid literal for int() with base 10: '6/'

    Exception Location: /home/rd/Desktop/django19/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py in get_prep_value, line 976
    Python Executable: /home/rd/Desktop/django19/bin/python
    Python Version: 2.7.6
    Python Path:

    ['/home/rd/Desktop/django19/src',
    '/home/rd/Desktop/django19/lib/python2.7',
    '/home/rd/Desktop/django19/lib/python2.7/plat-i386-linux-gnu',
    '/home/rd/Desktop/django19/lib/python2.7/lib-tk',
    '/home/rd/Desktop/django19/lib/python2.7/lib-old',
    '/home/rd/Desktop/django19/lib/python2.7/lib-dynload',
    '/usr/lib/python2.7',
    '/usr/lib/python2.7/plat-i386-linux-gnu',
    '/usr/lib/python2.7/lib-tk',
    '/home/rd/Desktop/django19/local/lib/python2.7/site-packages',
    '/home/rd/Desktop/django19/lib/python2.7/site-packages']

    Server time: Mon, 8 Feb 2016 20:36:29 +0000

Leave a Reply

Your email address will not be published.


*