Wrong confirmation ID
  • Email
  • Favorite
  • Download
  • Embed
  • Private Content

Basic Crud In Django

by mcantelon on Oct 20, 2007

  • 29,240 views

This presentation details how to do basic CRUD in Django.

This presentation details how to do basic CRUD in Django.

Accessibility

Categories

Tags

django python crud open-web-vancouver2008 mike cantelon desenvolvimento web

More...

Upload Details

Uploaded via SlideShare as Adobe PDF

Usage Rights

© All Rights Reserved

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

20 Embeds 889

http://birtanyildiz.blogspot.com 298
http://cachina.wordpress.com 220
http://www.slideshare.net 155
http://log.7thpark.com 66
http://py-arahat.blogspot.com 44
http://blog.cachina.com.br 40
http://py.arahat.net 35
http://cachina.com.br 9
http://py-arahat.blogspot.com.es 4
http://makethepitch.tigerlab.com 3
http://www.rkblog.rk.edu.pl 3
http://translate.googleusercontent.com 3
http://www.python.rk.edu.pl 2
http://reader.youdao.com 1
http://www.google.com.tr 1
http://mj.limewebs.com 1
http://py-arahat.blogspot.mx 1
http://www.feedage.com 1
http://birtanyildiz.blogspot.com.au 1
http://py-arahat.blogspot.com.ar 1

More...

Statistics

Favorites
17
Downloads
676
Comments
3
Embed Views
889
Views on SlideShare
28,351
Total Views
29,240

13 of 3 previous next Post a comment

  • tmountain tmountain More typos:

    1) in urls.py, you need a comma at the end of each line
    2) the delete line causes a runtime error:

    (r'^links/delete/(?P\d+)', 'diglic.links.views.delete'),

    This would be a nice tutorial, but it really needs some cleanup work.
    2 years ago Reply
    Are you sure you want to Yes No
  • tmountain tmountain A few typos in here:

    1) when creating the models, the key name should be max_length not maxlength.

    2) the edit method neglects to pass in the links variable, so it can't pre-populate the form. it should read as follows:

    def edit(request, id):
    link = Link.objects.get(id=id)
    return render_to_response(
    'links/form.html',
    {'link' : link,
    'action' : 'update/' + id,
    'button' : 'Update'}
    )

    3) the ObjectPaginator has been renamed to Paginator in the most recent Django. To use it, you'll have to make the appropriate changes.

    def list(request, page = 1, message = ''):
    page = int(page)
    link_list = Paginator(Link.objects.all(), 5)
    p = link_list.page(page)
    has_previous = p.has_previous()
    has_next = p.has_next()
    .....
    2 years ago Reply
    Are you sure you want to Yes No
  • guestdd41b2 guestdd41b2


    <b>[Comment posted from</b> http://log.7thpark.com/catalog.asp?tags=Django]
    2 years ago Reply
    Are you sure you want to Yes No
Post Comment
Edit your comment Cancel

Basic Crud In Django — Presentation Transcript