> On Feb 25, 2:41 pm, Paul Waldo p...@waldoware.com> wrote:
>   
>> Hi all,
>>
>> I am brand new to Django, so forgive me if my questions are naive :-)
>>
>> I have read the tutorials and I'm starting my first learning
>> application.  This is a small time-tracking application.  As you can
>> imagine, the majority of the application is basic CRUD data entry.  The
>> other significant part is that I want to automatically create reports on
>> a regular basis and email them.  I have two questions:
>>
>> * The Admin application is great for my CRUD functionality; Django does
>> a really fine job of creating this interface automatically.  
>> Unfortunately, using the Admin app. for data entry does not provide a
>> seamless experience; the URLs are different, the look and feel is
>> different, and the Admin is much more polished than my hand-crafted
>> pages :-).  Do people use the Admin for regular users, or do they
>> duplicate all that CRUD in their own pages?  Is there a way to make the
>> Application/Admin more seamless?
>>     
>
> There are various options, depending on what sort of users you are
> catering for:
> * Extend the admin using the built-in hooks, eg using a custom form
> for your model. Django renders this in exactly the same way as any
> other admin form.
> * Write your own views but inherit from the admin templates, to get
> their look and feel. This is good if you have trusted users, but need
> a bit more functionality than the admin can provide.
> * Use the CRUD generic views. Best for regular users.
>
>   
>> * Is there a standard model for running automated tasks?  I was thinking
>> about a cron task that uses lynx or curl to call a URL that performs the
>> task, but that gets kind of ugly.  Is there a better way to do this?
>>     
>
> Ugly is right. Use cron by all means, but don't run the process via
> the webserver. Instead, create a custom manage.py command within your
> app, and get cron to call that. See the (unfortunately very basic)
> documentation here:
> http://docs.djangoproject.com/en/dev/howto/custom-management-commands/
>
> --
> DR.
>   
Excellent ideas, Daniel.  I'm going to try extending the admin forms, 
and I'll try the manage.py command.  Thanks!

Paul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to