Your SlideShare is downloading. ×

Mixing Plone and Django for explosive results

3,598

Published on

How to integrate Plone, Satchmo and Pinax to obtain a single integrated system that

How to integrate Plone, Satchmo and Pinax to obtain a single integrated system that

1 Comment
7 Likes
Statistics
Notes
No Downloads
Views
Total Views
3,598
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
45
Comments
1
Likes
7
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. C³: Mixing Plone and Djangofor explosive results!
  • 2. The requirements● a modern e-commerce platform● with a good contents story● and advanced community features
  • 3. Plone alone... will get it done?a good web CMS like Plone has no clue of:● e-commerce needs● advanced community featuresno known Plone extension could convinceus and...we didnt want to start any new Ploneproject with this needs
  • 4. The quest for a good solutionThe Graal should:● be python based (we ♥ python!)● not reinvent the wheel● be open source● have a community behind (we ♥ happy customers)
  • 5. Attack of the poniesWe looked at Django:● good and stable since years● with a strong and passionate community● had a proven ecommerce solution and a proven community solution
  • 6. The evil plan
  • 7. Satchmo, the e-commercehttp://www.satchmoproject.com/● feature rich● flexible as we needed● with a group of people really using and improving it
  • 8. Pinax, the communityhttp://pinaxproject.com/● a suite of modules for community purposes● reuse whats already there● good working example projects included
  • 9. Why Plone then?talking about web CMSs:● python based (we ♥ python!)● not reinvent the wheel● open source● with a community behind (we ♥ happy customers)● "nothing compares to you"
  • 10. Its a long way to the top● integration, integration, integration● choices, choices, choiceslooking for sustainable and elegantsolutions
  • 11. The Plone and Django dancea coreographers job● Dont stomp on each others feet● Dont do the same things twice
  • 12. The dance steps● common theming via Diazo● dont store the same data twice● let one see what the other does
  • 13. Ballets preview
  • 14. What about the users?● CMS users are content editors ● they do not mix with the common people● Users are common across Django apps ● but not across Plone
  • 15. Im sure I had it somewhere● Plone needs to read from the database● sqlalchemy? Duplication of code
  • 16. To import or not to import django.db.models?It is nobler in the code to suffer:● The thousand errors of circular dependencies● Or to take arms against settings.py, and by fixing that end themHamlet did it wrong
  • 17. Syncronizing the dancers● Django handles the transaction trasparently via middleware● Hook up the right methods to Zopes transaction machinery
  • 18. Ive got a fever, and the only cure is... less code!● Sharing the same logic between Django and Plone views● Using django templates in Plone● Thats the python, baby (and you just have to enjoy it)
  • 19. Murphys impedanceSome things we didnt quiteconsider● Internationalization and language selection syncing● Linking content between systems● Paster vs nginx
  • 20. Building the launch ramps● Single buildout● Paster+SQLite for development ● Quick, pain-free setup● PostgreSQL+nginx+uwsgi for deployment ● More robust but also more convoluted
  • 21. Traps and dark pits● The Content-Length problem ● Aka “Hello nginx, I have some bytes for you”● Wheres that cookie coming from? ● An i18n tale of horrors
  • 22. The duct-taped parts● Static files and media files● The slow agony of settings.py
  • 23. And in the end... they all lived on github● djc.recipe● ~collective/collective.django
  • 24. Towards the infinite, and beyond● Integrating users (PAS+repoze.who)● Making development faster● Managing themes and files easily

×