Soumettre la recherche
Mettre en ligne
Meetup django common_problems(1)
•
Télécharger en tant que PPTX, PDF
•
6 j'aime
•
1,737 vues
Eric Satterwhite
Suivre
Slides from 5/11/2011 Milwaukee Django User Group Meetup
Lire moins
Lire la suite
Technologie
Art & Photos
Signaler
Partager
Signaler
Partager
1 sur 127
Télécharger maintenant
Recommandé
Developing and testing ajax components
Developing and testing ajax components
Ignacio Coloma
What's new in Rails 2?
What's new in Rails 2?
brynary
The Basics Of Page Creation
The Basics Of Page Creation
Wildan Maulana
Front End on Rails
Front End on Rails
Justin Halsall
Evolution of API With Blogging
Evolution of API With Blogging
Takatsugu Shigeta
Changing Template Engine
Changing Template Engine
Takatsugu Shigeta
WordPress Development Confoo 2010
WordPress Development Confoo 2010
Brendan Sera-Shriar
Building Pluggable Web Applications using Django
Building Pluggable Web Applications using Django
Lakshman Prasad
Recommandé
Developing and testing ajax components
Developing and testing ajax components
Ignacio Coloma
What's new in Rails 2?
What's new in Rails 2?
brynary
The Basics Of Page Creation
The Basics Of Page Creation
Wildan Maulana
Front End on Rails
Front End on Rails
Justin Halsall
Evolution of API With Blogging
Evolution of API With Blogging
Takatsugu Shigeta
Changing Template Engine
Changing Template Engine
Takatsugu Shigeta
WordPress Development Confoo 2010
WordPress Development Confoo 2010
Brendan Sera-Shriar
Building Pluggable Web Applications using Django
Building Pluggable Web Applications using Django
Lakshman Prasad
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
aasarava
Best Practice Testing with Lime 2
Best Practice Testing with Lime 2
Bernhard Schussek
Система рендеринга в Magento
Система рендеринга в Magento
Magecom Ukraine
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Sergey Ilinsky
Best practices for js testing
Best practices for js testing
Karl Mendes
Ant
Ant
sundar22in
Gae
Gae
guest0e51364
Jquery 1
Jquery 1
Manish Kumar Singh
Findability Bliss Through Web Standards
Findability Bliss Through Web Standards
Aarron Walter
ColdFusion ORM
ColdFusion ORM
Denard Springle IV
Django
Django
webuploader
Django Forms: Best Practices, Tips, Tricks
Django Forms: Best Practices, Tips, Tricks
Shawn Rider
Element
Element
mussawir20
Jsp Presentation +Mufix "3"
Jsp Presentation +Mufix "3"
SiliconExpert Technologies
Ajax
Ajax
wangjiaz
Web APIs & Google APIs
Web APIs & Google APIs
Pamela Fox
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Pamela Fox
YQL talk at OHD Jakarta
YQL talk at OHD Jakarta
Michael Smith Jr.
Haml & Sass presentation
Haml & Sass presentation
bryanbibat
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
Pamela Fox
Building & Managing Windows Azure
Building & Managing Windows Azure
K.Mohamed Faizal
Global management trends in a two speed world 2.9.2011
Global management trends in a two speed world 2.9.2011
ncovrljan
Contenu connexe
Tendances
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
aasarava
Best Practice Testing with Lime 2
Best Practice Testing with Lime 2
Bernhard Schussek
Система рендеринга в Magento
Система рендеринга в Magento
Magecom Ukraine
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Sergey Ilinsky
Best practices for js testing
Best practices for js testing
Karl Mendes
Ant
Ant
sundar22in
Gae
Gae
guest0e51364
Jquery 1
Jquery 1
Manish Kumar Singh
Findability Bliss Through Web Standards
Findability Bliss Through Web Standards
Aarron Walter
ColdFusion ORM
ColdFusion ORM
Denard Springle IV
Django
Django
webuploader
Django Forms: Best Practices, Tips, Tricks
Django Forms: Best Practices, Tips, Tricks
Shawn Rider
Element
Element
mussawir20
Jsp Presentation +Mufix "3"
Jsp Presentation +Mufix "3"
SiliconExpert Technologies
Ajax
Ajax
wangjiaz
Web APIs & Google APIs
Web APIs & Google APIs
Pamela Fox
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Pamela Fox
YQL talk at OHD Jakarta
YQL talk at OHD Jakarta
Michael Smith Jr.
Haml & Sass presentation
Haml & Sass presentation
bryanbibat
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
Pamela Fox
Tendances
(20)
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
Best Practice Testing with Lime 2
Best Practice Testing with Lime 2
Система рендеринга в Magento
Система рендеринга в Magento
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Best practices for js testing
Best practices for js testing
Ant
Ant
Gae
Gae
Jquery 1
Jquery 1
Findability Bliss Through Web Standards
Findability Bliss Through Web Standards
ColdFusion ORM
ColdFusion ORM
Django
Django
Django Forms: Best Practices, Tips, Tricks
Django Forms: Best Practices, Tips, Tricks
Element
Element
Jsp Presentation +Mufix "3"
Jsp Presentation +Mufix "3"
Ajax
Ajax
Web APIs & Google APIs
Web APIs & Google APIs
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
YQL talk at OHD Jakarta
YQL talk at OHD Jakarta
Haml & Sass presentation
Haml & Sass presentation
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
En vedette
Building & Managing Windows Azure
Building & Managing Windows Azure
K.Mohamed Faizal
Global management trends in a two speed world 2.9.2011
Global management trends in a two speed world 2.9.2011
ncovrljan
Advanced Administrative Solutions
Advanced Administrative Solutions
Marianne Campbell
ePortfolio for Forensic Psychology
ePortfolio for Forensic Psychology
MicheleFoster
Ubuntu sunum...
Ubuntu sunum...
HuseyinADSIZ
So you want to be a pre sales architect or consultant
So you want to be a pre sales architect or consultant
K.Mohamed Faizal
En vedette
(6)
Building & Managing Windows Azure
Building & Managing Windows Azure
Global management trends in a two speed world 2.9.2011
Global management trends in a two speed world 2.9.2011
Advanced Administrative Solutions
Advanced Administrative Solutions
ePortfolio for Forensic Psychology
ePortfolio for Forensic Psychology
Ubuntu sunum...
Ubuntu sunum...
So you want to be a pre sales architect or consultant
So you want to be a pre sales architect or consultant
Similaire à Meetup django common_problems(1)
Building Web Interface On Rails
Building Web Interface On Rails
Wen-Tien Chang
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Mir Nazim
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
Igor Sobreira
Jsp
Jsp
DSKUMAR G
Struts,Jsp,Servlet
Struts,Jsp,Servlet
dasguptahirak
Strutsjspservlet
Strutsjspservlet
Sagar Nakul
Strutsjspservlet
Strutsjspservlet
Sagar Nakul
WordPress Standardized Loop API
WordPress Standardized Loop API
Chris Jean
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
Tikal Knowledge
WordPress APIs
WordPress APIs
Joseph Scott
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
The Django Web Application Framework 2
The Django Web Application Framework 2
fishwarter
Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007
Guillaume Laforge
Merb jQuery
Merb jQuery
Yehuda Katz
Intro To Mvc Development In Php
Intro To Mvc Development In Php
funkatron
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
John Brunswick
Javascript
Javascript
timsplin
Similaire à Meetup django common_problems(1)
(20)
Building Web Interface On Rails
Building Web Interface On Rails
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
Jsp
Jsp
Struts,Jsp,Servlet
Struts,Jsp,Servlet
Strutsjspservlet
Strutsjspservlet
Strutsjspservlet
Strutsjspservlet
WordPress Standardized Loop API
WordPress Standardized Loop API
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
WordPress APIs
WordPress APIs
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
The Django Web Application Framework 2
The Django Web Application Framework 2
The Django Web Application Framework 2
The Django Web Application Framework 2
The Django Web Application Framework 2
The Django Web Application Framework 2
The Django Web Application Framework 2
The Django Web Application Framework 2
Grails Introduction - IJTC 2007
Grails Introduction - IJTC 2007
Merb jQuery
Merb jQuery
Intro To Mvc Development In Php
Intro To Mvc Development In Php
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
Javascript
Javascript
Dernier
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
Alfredo García Lavilla
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
SeasiaInfotech2
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
Zilliz
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Memoori
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
Dernier
(20)
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
Meetup django common_problems(1)
1.
2.
Who is this
fool?! A little about me
3.
Graphic Art Photography
Web Design Django VFX JavaScript Print Design Software Digital Media CSS Python Flash / Flex
4.
5.
PERL & JavaScript
6.
7.
Django = HotPileOfAwesome(
yes=True ) Django.build_web_app( fast=True )
8.
Django.make_an_app() >>> True
Django.log_in_user() >>> True Django.comment_on_my_model() >>> True Django.message_my_user(user='myuser') >>> True Django.send_emails( emails=['me@mail.com'] ) >>> True Django.do_complex_SQL( please=True ) >>> No Problem!
9.
Django.make_a_thumbnail() >>> Thumbnail?
Django.send_text_message() >>> Email Exception: no such thing Django.search_all_my_stuff() >>> WTF? Django.get_data_in_under_75_queries() >>> Whoa... Django.alter_table(model='MyModel') >>> Let's not get crazy Django.be_restful( now=True ) >>> you meanrequest.POST
10.
I've Got an
app for that!
11.
Searching
12.
Searching Find Stuff
- Fast
13.
Searching Find Stuff
- Fast ( without crushing my DB )
14.
Haystack haystacksearch.org Djapian
code.google.com/p/djapian/ Sphinx django-sphinx ( github )
15.
16.
slow
17.
mysql
18.
19.
Haystack SearchQuerySet() .filter(
SQ(field=True) | SQ(field__relation="something") ~SQ(field=False) ) >>> [ <SearchResult>, <SearchResult>, <SearchResult> ]
20.
Xapian classArticleIndexer( Indexer
): fields = ['title','body'] tags = [ ('title','title', 3), ('body', 'as_plain_text', 1) ] space.add_index(Article, ArticleIndexer, attach_as='indexer')
21.
Xapian fromdjapian.indexer import
CompositeIndexer flags = xapian.QueryParser.FLAG_PARTIAL| br />xapian.QueryParser.FLAG_WILDCARD indexers = [ Model_1.indexer, Model_2.indexer ] comp = CompositeIndexer( *indexers ) s = comp.search( `a phrase` ).flags( flags ) >>> [ <hit:score=100>,<hit:score=98> ] $ s[0].instance >>> <ModelInstance:Model>
22.
23.
Whole Word Matching
24.
Loads all indexers
25.
Multiple Index Hooks
26.
Stored fields
27.
Django-like Syntax
28.
Templates &
Tags
29.
Views, Forms &
Fields
30.
Wildcard Matching
31.
Partial word matching
32.
Doesn't Load All
indexers
33.
Interactive shell
34.
Close to the
metal ( Control )
35.
Watches Models for
changes
36.
37.
REST API Exposing
Your Data
38.
REST API Exposing
Your Data ( In a meaningful way )
39.
40.
Can't restrict access
based on HTTP methods
41.
Serialization is left
up to you
42.
Manual auth
43.
44.
Piston classMyHandler( BaseHandler
): methods_allowed =( 'GET', 'PUT') model = MyModel classMyOtherHandler( BaseHandler ): methods_allowed =( 'GET', 'PUT') model = MyOtherModel fields = ('title','content',('author',('username',) ) ) exclude = ('id', re.compile(r'^private_')) defread( self, request): return [ x for x in MyOtherModel.objects.select_related() ] defupdate( self, request ): ...
45.
Tastypie classMyResource( ModelResource
): fk_field = fields.ForiegnKey( OtherResource, 'fk_field' ) classMeta: authentication = ApiKeyAuthentication() queryset = MyModel.object.all() resource_name = 'resource' fields = ['title', 'content', ] allowed_methods = [ 'get' ] filtering = { 'somfield': ('exact', 'startswith') } defdehydrate_FOO( self, bundle ): return bundle.data[ 'FOO' ] = 'What I want'
46.
Tastypie - Client
Side newRequest.JSONP({ url:'http://www.yoursite.com/api/resource' ,method:'get' ,data:{ username:'billyblanks' ,api_key:'5eb63bbbe01eeed093cb22bb8f5acdc3' ,title__startswith:"Hello World" } ,onSuccess: function( data ){ console.info( data.meta ); console.log( data.objects ): }).send(); http://www.yoursite.com/api/resource/1 http://www.yoursite.com/api/resource/set/1;5 http://www.yoursite.com/api/resource/?format=xml
47.
48.
Built in fields
49.
Auto Meta Data
50.
Resource URIs
51.
ORM ablities (
client )
52.
API Key Auth
53.
Object Caching (
backends )
54.
De / Re
hydrations hooks
55.
Validation Via Forms
56.
Deep ORM Ties
57.
Data Streaming
58.
OAuth / contrib
Auth
59.
URI Templates
60.
61.
DATABASE
62.
DJANGO-SOUTH south.aeracode.org QUERYSET-TRANSFORM
github.com/jbalogh/django-queryset-transform DJANGO-SELECTREVERSE code.google.com/p/django-selectreverse
63.
SOUTH
64.
SOUTH Database Migrations
65.
DJANGO $ python
manage.py syncdb
66.
DJANGO $ python
manage.py syncdb >>> You have a new Database!
67.
DJANGO classMyModel( models.Model):
relation = models.ForiegnKey( Model2 )
68.
DJANGO classMyModel( models.Model
): relation = models.ForiegnKey( Model2 ) classMyModel( models.Model ): relation = models.ManyToMany( Model2 )
69.
DJANGO $ python
manage.py syncdb
70.
DJANGO $ python
manage.py syncdb >>> Sucks to be you!
71.
WTF?!
72.
73.
DJANGO classMyModel( models.Model
): relation = models.ForiegnKey( Model2 ) classMyModel( models.Model ): relation = models.ManyToMany( Model2 )
74.
SOUTH $ python
manage.py schemamigration <yourapp> >>> Sweet, run migrate
75.
SOUTH $ python
manage.py migrate <yourapp> >>> Done.
76.
SOUTH
77.
QUERYSET-TRANSFORM github.com/jbalogh/django-queryset-transform (
n + 1 )
78.
QUERYSET-TRANSFORM {%for object
in object_list %} {%for object in object.things.all %} {%if object.relation %} {{ object.relation.field.text }} {%else%} {{ object.other_relation }} {%endif%} {%endfor%} {%empty%} no soup for you {%endfor%}
79.
80.
QUERYSET-TRANSFORM deflookup_tags(item_qs): item_pks
= [item.pk for item in item_qs] m2mfield = Item._meta.get_field_by_name('tags')[0] tags_for_item = br />Tag.objects.filter( item__in = item_pks) .extra(select = {'item_id': '%s.%s' % ( m2mfield.m2m_db_table(), m2mfield.m2m_column_name() ) }) tag_dict = {} for tag in tags_for_item: tag_dict.setdefault(tag.item_id, []).append(tag) for item in item_qs: item.fetched_tags = tag_dict.get(item.pk, [])
81.
QUERYSET-TRANSFORM qs =
Item.objects.filter( name__contains = 'e' ).transform(lookup_tags)
82.
QUERYSET-TRANSFORM from django.db
import connection len( connection.queries ) >>> 2
83.
DJANGO-SELECTREVERSE code.google.com/p/django-selectreverse
84.
DJANGO-SELECTREVERSE Tries prefetching
on reverse relations model_instance.other_model_set.all()
85.
CONTENT MANAGEMENT
86.
DJANGO-CMS www.django-cms.org WEBCUBE-CMS
www.webcubecms.com SATCHMO www.satchmoproject.com
87.
WEBCUBE-CMS
88.
WEBCUBE-CMS Feature Complete
89.
WEBCUBE-CMS Feature Complete
Robust & Flexible
90.
WEBCUBE-CMS Feature Complete
Robust & Flexible ( Commercial License )
91.
$12,000
92.
$12,000
93.
94.
+ $300 /
mo
95.
WTF?!
96.
DJANGO-CMS
97.
98.
99.
Plugin Support
100.
Template Switching
101.
Menu Control
102.
Translations
103.
Front-End Editing (
latest )
104.
Moderation
105.
Template Tags
106.
Lots of settings
107.
Lots Of Settings
( again )
108.
Another Learning Curve
109.
Plone Paradox
110.
111.
SATCHMO E-Commerce-y CMS
112.
Django Admin
113.
DJANGO-GRAPPELLI code.google.com/p/django-grappelli DJANGO-FILEBROWSE
code.google.com/p/django-filebrowser DJANGO-ADMIN TOOLS bitbucket.org/izi/django-admin-tools
114.
GRAPPELLI
115.
GRAPPELLI
116.
GRAPPELLI
117.
FILEBROWSER
118.
FILEBROWSER
119.
FILEBROWSER
120.
FILEBROWSER
121.
ADMIN TOOLS
122.
ADMIN TOOLS
123.
ADMIN TOOLS
124.
Image Management
125.
DJANGO-IMAGEKIT bitbucket.org/jdriscoll/django-imagekit DJANGO-PHOTOLOGUE
code.google.com/p/django-photologue SORL-THUMBNAIL thumbnail.sorl.net/
126.
DJANGO classMyModel( models.Model
): image = models.ImageField(upload_to='/' )
127.
DJANGO classMyModel( models.Model
): image = models.ImageField( upload_to='/' ) thumb = models.ImageField( upload_to='/' )
128.
DJANGO classMyModel( models.Model
): image = models.ImageField( upload_to='/' ) thumb = models.ImageField( upload_to='/' ) >>> MyModel.objects.get(pk=1) >>> MyModel.objects.image.url >>> MyModel.objects.thumb.url
129.
ImageField
130.
ImageField It Kinda
Sucks
131.
IMAGEKIT Evolution Of
Photologue
132.
IMAGEKIT classPhoto( ImageModel
): name = models.CharField(max_length=100) image = models.ImageField(upload_to='photos') views = models.PositiveIntegerField(default=0) classIKOptions: #define the ImageKit options spec_module = 'myapp.specs' cache_dir = 'photos' image_field = 'image' save_count_as = 'views'
133.
IMAGEKIT classResizeThumb( processors.Resize
): width = 100 height = 75 crop = True classResizeDisplay( processors.Resize ): width = 600 # now we can define our thumbnail spec classThumbnail( ImageSpec ): access_as = 'thumbnail_image' pre_cache = True processors = [ ResizeThumb ] classDisplay( ImageSpec ): increment_count = True processors = [ ResizeDisplay ]
134.
IMAGEKIT $ photo
= Photo.objects.get( pk =1 ) $ photo.display.url >>> u'/path/to/media/photo_display.jpg' $ photo.thumbnail.width >>> 100
135.
136.
DB Friendly
137.
Format Adjustment
138.
Color Adjustment
139.
Transposing
140.
Galleries out of
the box
141.
Bulk Upload
142.
Admin Integration
143.
Pre-cache command
144.
Very DB Dependant
145.
4 Models (
2 Solid )
146.
Templates / Views
/ Urls
147.
148.
149.
DB Friendly
150.
Format Adjustment
151.
Color Adjustment
152.
Transposing
153.
Galleries out of
the box
154.
Bulk Upload
155.
Admin Integration
156.
Pre-cache command
157.
Very DB Dependant
158.
4 Models (
2 Solid )
159.
Exif SupportBeware of
View Counts
160.
ImageField
161.
ImageField It's Kinda
Messy
162.
SORL
163.
SORL from sorl.thumbnail
import ImageField classMyModel( models.Model ): iamge = ImageField( upload_to="/folder" )
164.
SORL {% load
thumbnail %} {%thumbnail obj.image "1000x600" crop='top' as im %} <img src="{{ im.url }}" /> {%endthumbnail%}
165.
MESSAGING
166.
User - to
- User Messaging
167.
DJANGO-POSTMAN bitbucket.org/psam/django-postman DJANGO-MESSAGES
code.google.com/p/django-messages DJANGO-SMS code.google.com/p/django-sms
168.
DJANGO-SMS
169.
DJANGO-SMS User Enters
Phone # User Selects Carrier
170.
THATS IT
171.
FREE
172.
UTILS
173.
DJANGO-EXTENSIONS github.com/django-extensions/django-extensions DEBUG-TOOLBAR
github.com/robhudson/django-debug-toolbar DJANGO-MAINTENANCEMODE pypi.python.org/pypi/django-maintenancemode DJANGO-PAGINATION github.com/ericflo/django-pagination DJANGO-GUARDIAN github.com/lukaszb/django-guardian HOTSAUCE ( self plug )
174.
DJANGO-EXTENSIONS 21 Commands
4 Fields 2 Models 1 Admin Extension ( FK AutoComplete ) $ python manage.py dumpscript >>> your_app.py $ python manage.py runscript >>> your_app.pyc $ python manage.py runserver_plus >>> Debugger baked right in $ python manage.py shell_plus >>> AutoLoad Models $ python manage.py show_urls >>> /your/endpoint/:idproject.app.views.view_func
175.
RUNSERVER_PLUS
176.
DEBUG TOOLBAR
177.
DEBUG TOOLBAR
178.
MAINTENANCEMODE
179.
MAINTENANCEMODE MAINTENANCE_MODE =
True
180.
MAINTENANCEMODE MAINTENANCE_MODE =
True
181.
MAINTENANCEMODE MAINTENANCE_MODE =
True
182.
HOTSAUCE
183.
HOTSAUCE I Put
That $*!T On Everything
184.
HOTSAUCE
185.
HOTSAUCE
186.
HOTSAUCE QueueItem ChangeSet
title content Model A ChangeSet title content ChangeSet Model A ChangeSet title content
187.
HOTSAUCE
Télécharger maintenant