Your SlideShare is downloading. ×
django.contrib.databrowse
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

django.contrib.databrowse

2,898
views

Published on

Slides for my django.contrib.databrowse presentation given at BayPIGgies on 2009-Oct-22.

Slides for my django.contrib.databrowse presentation given at BayPIGgies on 2009-Oct-22.

Published in: Technology, Design

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,898
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. django.contrib.databrowse
  • 2. whoami: Eddy Mulyono
    • lazy
    • 3. magic-removal
    • 4. MS in CS thesis
      • need quick UI
  • 5. who: Survey
    • Use databrowse
    • 6. Hack databrowse
  • 7. Outline
  • 11. django.contrib.admin
  • 13. django.contrib.databrowse
  • 14. INSTALL
    • admin
    • databrowse
  • 15. INSTALLED_APPS
    • django.contrib.admin
    • django.contrib. databrowse
  • 16. urls.py
    • from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # … (r'^admin/', include(admin.site.urls)),
    • from django.contrib import databrowse urlpatterns = patterns('', # … (r'^databrowse/(.*)', databrowse.site.root) ,
  • 17. register
    • from mysite.polls.models import Poll from django.contrib import admin admin.site.register(Poll)
    • from myapp.models import SomeModel, SomeOtherModel from django.contrib import databrowse databrowse.site. register(SomeModel) databrowse.site. register(SomeOtherModel)
  • 18. (teaser)
  • 19. Multi-site
    • admin.site
      • admin/__init__.py:
        • from django.contrib.admin.sites import AdminSite, site
      • admin/sites.py:
        • site = AdminSite()
    • site2 = admin.sites. AdminSite()
    • databrowse.site
      • databrowse/__init__.py:
        • from django.contrib.databrowse.sites import DatabrowsePlugin, ModelDatabrowse, DatabrowseSite, site
      • databrowse/sites.py:
        • site = DatabrowseSite()
    • site2 = databrowse.sites. DatabrowseSite()
  • 20. Customize
    • ModelAdmin
      • admin.site.register(Poll, PollAdmin)
    • ModelDatabrowse
      • databrowse.site. register(SomeModel, SomeModelDatabrowse)
  • 21. databrowse.ModelDatabrowse
    • plugins
      • class DefaultModelDatabrowse(ModelDatabrowse): plugins = {'objects': ObjectDetailPlugin(), 'calendars': CalendarPlugin(), 'fields': FieldChoicePlugin()}
  • 22. databrowse.plugins
    • ObjectDetailPlugin
    • 23. CalendarPlugin
    • 24. FieldChoicePlugin
  • 25. databrowse.DatabrowsePlugin
    • model_index_html
    • 26. model_view
  • 27. absolute_url
    • get_absolute_url
      • return ('databrowse', ('polls/poll/objects/%i/' % self.pk,), {})
  • 28. Q&A
  • 29. references
    • http://docs.djangoproject.com/en/1.1/ref/contrib/databrowse/
    • 30. Pictures
      • http://www.flickr.com/photos/stinajonsson/3932774410/
      • 31. http://www.flickr.com/photos/daveknapik/3280194084/
      • 32. http://www.flickr.com/photos/endlessstudio/3861211128/
      • 33. http://press.absolut.com/
      • 34. http://www.flickr.com/photos/oberazzi/318947873/

×