Reusable Django apps

I found many resources on the differences between Django projects and reusable applications, most notably DjangoCon talk , and the Pinax .

However, as a beginner, writing my own projects and reusable software seems a bit tricky. I don't quite understand how the models go (and how applications can be flexible and permissive), where the templates go and how different applications go together.

Are there any tutorials for creating a project with reusable apps? Best practices page? Most preferably, a sample project with its own applications (rather than depend on external applications)?

I try to understand the architecture of the project and the interaction between applications, not just create reusable applications. Most of the tutorials I have come across on the web is how to create a reusable application or create a simple mono blog application that only has external dependencies on the builtins or django.contrib modules.

+2


source to share


3 answers


James Bennett Hands-On Django Projects cover these topics in general pretty well, and even includes a chapter on Writing Reusable Django Applications, which walks through an example of splitting one of the sample projects in the book into your application.



+4


source


You can watch the video (DjangoCon 2008: Reusable Applications) - http://www.youtube.com/watch?v=A-S0tqpPga4 and get an idea of ​​how to use it.

There are many reusapbe apps on google, djangosnippets, git, etc. Most Popular:



  • django-contact-form - contact form;
  • django-debug-toolbar - view sql queries, etc.
  • django-registration + django-profiles - skip regs procedures;
  • django-mptt - use a tree structure;
  • django-pagination is a useful page viewer;
  • django-stdimage or sorl-thumbnail - image routines;
  • south - schema migration;

Read the sample docs and save dev time. Good luck!

+3


source


If you want to see "sample projects with reusable applications interacting with each other", there is no better place to look than downloading Pinax , cloning one of their reference projects (just follow the docs) and reading the code carefully.

+3


source







All Articles