The main idea in django is to reuse apps. Define the functionality that you want and search for it. It is likely that you will find a lot of applications that you can use to speed up ur development.
As an example of using a lot of application, check out http://pinaxproject.com/ On Wed, Dec 30, 2009 at 9:11 AM, Marc Aymerich <glicer...@gmail.com> wrote: > Hi everyone, > > I just started developing my first web application, I chose Django for this > job and I'm so excited with it. It's a control panel with billing > system for the ISP which I'm working for. This control > panel allows customers and our admins to add domains, email accounts, ftp > accounts, databases... and then bill. As it is the first time i'm using > django, i'd like to share with you how im thinking to implement it so I can > be sure I'm doing fine, respecting django philosophy :). > > *I've defined the database model in models.py > > *I've created two instances of the AdminSite, (one for admins, another for > customers) > > *The database can be updated by 3 differents ways: > > +Admin panel > > +Customer panel > > +Synchronization app (to allow sysadmins to do modifications directly on > the system without loosing consistence between the database and the system) > > *For the admin and the customer panel I want to override the function > save_model via /contrib/admin/options.py. I want to call there a function > so a resource is created in the system, ex: create_domain(). ¿Is that the > best place to call create_domain()? > > *The synchronization app is called by cron each 'X' time. via wget > http://panel.mydomain.org/app/<http://panel.mydomain.org/app/syncrhonitzation> > syncrhon > <http://panel.mydomain.org/app/syncrhonitzation>itzation<http://panel.mydomain.org/app/syncrhonitzation>. > It looks up for changes and saves them into the database. > > *Every time that someone creates a new resource (ex. add domain) I need to > log it into "orders" table (to bill customers later). In order to preserve > data consistency I think the best way to do this is using the signal > django.db.models.signals.pre_save. > At this point I have a few questions: > > -Is using this signal is the best way? If this signal fail (don't insert a > row in orders table), is the default behaviour cancelling obj.save() > function? or domain is saved anyway in the database? If that's the case,can > the function that calls obj.save() know that the signal has failed? > > I appreciate any kind of comment! > > thank you a lot for reading until here! > > Marc > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.