Re: recommended method for administrative scripts?

2008-09-26 Thread Brian Neal

On Sep 26, 2:50 pm, ssam <[EMAIL PROTECTED]> wrote:
> Hello
>
> I have just made my first django site for my uncles wedding photos. It
> is very simple, just photos and tags, with a ManyToMany relationship.
> I have only made views for viewing the photos and am using the django
> admin system for uploading and tagging.
>
> I am wondering what is the best way to add scripts to do
> administrative tasks, that dont need to be triggerable by a URL.
>
> For example, a decided that the settings i had used to make the
> thumbnails where to low, and wanted to rerun the thumbnailing on each
> photo. I did this by making a function in views.py that did the
> looping through and resizing. Then adding a URL, and visiting it.
>
> This seemed like a rather kludgy method.
>
> I have a few other tasks that i might want to do. extract the date
> from the photos EXIF data, and put it in a field in the database (i
> already have the field).
>
> also i think i could save some time if it could scp a bunch of photos
> to a folder on my server, and add them into the database with a single
> command.
>
> So is there a recommended method of doing this soft of thing?
>
> Thanks
>
> Sam

Check out the django Photologue application. It's really slick. You
can upload through the admin interface a zip file of photos and it
will create a gallery for you from that. It also automatically resizes
photos according to a set of sizes you specify, and creates them only
on demand.

As for your question about how to make your own admin apps, check out
the online Django book, which has a chapter on how to do that
(suprisingly this isn't really covered in the online Django docs).

BN
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: recommended method for administrative scripts?

2008-09-26 Thread Erik Allik

With sorl.thumbnail you don't have to do that at all. It allows you to  
specify resize size on the fly, then caches the resulting image and  
always recreates the image if the size changes automatically.

Erik

On 26.09.2008, at 22:50, ssam wrote:

>
> Hello
>
> I have just made my first django site for my uncles wedding photos. It
> is very simple, just photos and tags, with a ManyToMany relationship.
> I have only made views for viewing the photos and am using the django
> admin system for uploading and tagging.
>
> I am wondering what is the best way to add scripts to do
> administrative tasks, that dont need to be triggerable by a URL.
>
> For example, a decided that the settings i had used to make the
> thumbnails where to low, and wanted to rerun the thumbnailing on each
> photo. I did this by making a function in views.py that did the
> looping through and resizing. Then adding a URL, and visiting it.
>
> This seemed like a rather kludgy method.
>
> I have a few other tasks that i might want to do. extract the date
> from the photos EXIF data, and put it in a field in the database (i
> already have the field).
>
> also i think i could save some time if it could scp a bunch of photos
> to a folder on my server, and add them into the database with a single
> command.
>
> So is there a recommended method of doing this soft of thing?
>
> Thanks
>
> Sam
> >


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



recommended method for administrative scripts?

2008-09-26 Thread ssam

Hello

I have just made my first django site for my uncles wedding photos. It
is very simple, just photos and tags, with a ManyToMany relationship.
I have only made views for viewing the photos and am using the django
admin system for uploading and tagging.

I am wondering what is the best way to add scripts to do
administrative tasks, that dont need to be triggerable by a URL.

For example, a decided that the settings i had used to make the
thumbnails where to low, and wanted to rerun the thumbnailing on each
photo. I did this by making a function in views.py that did the
looping through and resizing. Then adding a URL, and visiting it.

This seemed like a rather kludgy method.

I have a few other tasks that i might want to do. extract the date
from the photos EXIF data, and put it in a field in the database (i
already have the field).

also i think i could save some time if it could scp a bunch of photos
to a folder on my server, and add them into the database with a single
command.

So is there a recommended method of doing this soft of thing?

Thanks

Sam
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---