Re: migrating 400 images

2007-05-07 Thread Milan Andric
On May 5, 7:17 am, Nate Straz <[EMAIL PROTECTED]> wrote: > > >>> from blog.migrate import loadCOREBlog > > In loadCOREBlog I loaded all of the Zope libraries and started iterating > through whatever needed to be migrated. When I detected a problem I > would use Python's code.interact function

Re: displaying images

2007-05-06 Thread JP
Please read this tutorial, it explains what you should do to serve files statically: http://www.djangoproject.com/documentation/0.96/static_files/ On May 5, 7:20 pm, checco <[EMAIL PROTECTED]> wrote: > Hi, > > I have the following settings in settings.py: > MEDIA_ROOT =

displaying images

2007-05-05 Thread checco
Hi, I have the following settings in settings.py: MEDIA_ROOT = 'C:/my_project/static/' MEDIA_URL = 'http://127.0.0.1:8000/static/' I'd like to display some pictures which are in the folder C:/ my_project/static/offers ("static" is the folders that holds all the media, while "offers" holds only

Re: migrating 400 images

2007-05-05 Thread Nate Straz
On Fri, May 04, 2007 at 11:13:36PM -, Milan Andric wrote: > I'm migrating a tutorials site to Django and have created a file model > that is associated with tutorial pages, etc. Now I need to go through > and migrate all the old content. Rather than upload 400 images I was > hop

Re: migrating 400 images

2007-05-04 Thread Julio Nobrega
th tutorial pages, etc. Now I need to go through > and migrate all the old content. Rather than upload 400 images I was > hoping to write a script to call the File.save() method appropriately > and just copy the images into the new location. > > Any thoughts on how to approach this?

migrating 400 images

2007-05-04 Thread Milan Andric
Hi, I'm migrating a tutorials site to Django and have created a file model that is associated with tutorial pages, etc. Now I need to go through and migrate all the old content. Rather than upload 400 images I was hoping to write a script to call the File.save() method appropriately and just

saving images

2007-04-30 Thread [EMAIL PROTECTED]
Hello everyone, I am currently working on quite large-scale django-database. What client needs is a huge database of articles, and each article will be accompanied by 10-15 images, inside the article's body. Images and articles should be uploaded via admin interface. Right now I've solved

Re: Resize images on demand

2007-04-19 Thread Michel Thadeu Sabchuk
Hi Robbin, > > I've done a method to resize images on demand on a template, it is a > > simple filter that made use of PIL.Image, see the following template > > code: > > Sounds similair to the nesh thumbnail > utils:http://code.google.com/p/django-utils/wiki/Th

Re: Resize images on demand

2007-04-19 Thread Robbin
> I've done a method to resize images on demand on a template, it is a > simple filter that made use of PIL.Image, see the following template > code: Sounds similair to the nesh thumbnail utils: http://code.google.com/p/django-utils/wiki/

Resize images on demand

2007-04-18 Thread Michel Thadeu Sabchuk
Hi people! I've done a method to resize images on demand on a template, it is a simple filter that made use of PIL.Image, see the following template code: ... ... The code is already running, but I have another approach, reather than use a filter, I can define an automatic custom method

Re: Showing images in Django Admin

2007-04-08 Thread oggie rob
On Apr 8, 1:10 am, "oliver" <[EMAIL PROTECTED]> wrote: > Hi Rob, > would you mind posting the code you wrote as an example? Would be very > helpful. > > thank! > oli I posted my first djangosnippet to show it: http://www.djangosnippets.org/snippets/162/ HTH, -rob

Re: Showing images in Django Admin

2007-04-08 Thread oliver
Hi Rob, would you mind posting the code you wrote as an example? Would be very helpful. thank! oli On Apr 4, 5:26 pm, "oggie rob" <[EMAIL PROTECTED]> wrote: > For a list display, it can be very simple. Write a method within the > model that returns an "img" html tag, and use the "allow_tags" >

Re: Flatpages with images

2007-04-07 Thread Frankie Robertson
On 07/04/07, Alessandro Ronchi <[EMAIL PROTECTED]> wrote: > > Is it possible to add images to flatpages with a wysiwyg editor, > uploading them to a folder and using them into the page? There's a rather dated, but probably still working (until newforms-admin at least, which'l

Re: Flatpages with images

2007-04-07 Thread Ramdas S
I make a static page with images and just cut and paste the HTML from FrontPage or Dreamweaver. The images need to be stored on a server that can server images viz Apache. Ramdas On Apr 7, 6:09 pm, "Alessandro Ronchi" <[EMAIL PROTECTED]> wrote: > Is it possible to add

Flatpages with images

2007-04-07 Thread Alessandro Ronchi
Is it possible to add images to flatpages with a wysiwyg editor, uploading them to a folder and using them into the page? Thanks in advance. -- Alessandro Ronchi Skype: aronchi - Wengo: aleronchi http://www.alessandroronchi.net - Il mio sito personale http://www.soasi.com - Sviluppo Software e

Re: Showing images in Django Admin

2007-04-04 Thread oggie rob
For a list display, it can be very simple. Write a method within the model that returns an "img" html tag, and use the "allow_tags" decorator on that method (just like you would for short_description). Then add that method to your list_display variable in Admin. I did this for thumbnails. I

Re: Showing images in Django Admin

2007-04-04 Thread Edwin W
The django filebrowser admin extension may be close to what you're looking for, it will display thumbnails of images on a filesystem being browsed. I'm not sure how it integrates with the models though, haven't tried it myself. You'll need PIL as pointed out on the website. http://trac.dedhost

Showing images in Django Admin

2007-04-04 Thread brian corrigan
Hi all, I have a django model and want to include an image field. Is there a way of displaying this field in the admin templates as an image (not the string path of the image) or do I have to write my own template for that? Cheers Brian --~--~-~--~~~---~--~~

Re: Use images and css in templates

2007-03-09 Thread [EMAIL PROTECTED]
Thanks. It solved. best regards, > > Here is my urls.py: > > > from django.conf.urls.defaults import * > > > urlpatterns = patterns('', > > # Example: > > # (r'^mysite/', include('mysite.apps.foo.urls.foo')), > > (r'^blog/', include('mysite.blog.urls')), > >

Re: Use images and css in templates

2007-03-08 Thread Tim Chase
> After I run : python manage.py runserver and browse my blog, it seems > that it can't read my images and css. I am not using apache because I > am developing my blog using my personal pc (Windows XP) > > Here is my urls.py: > > from django.conf.urls.defaults impo

Re: Apache Images

2007-03-04 Thread Fes
My mistake I was missing the media from the url... It should be MEDIA_URL = 'http://'+ get_ip_address()+'/media/images/' On Mar 4, 8:36 pm, "Fes" <[EMAIL PROTECTED]> wrote: > Hi, > > I am having problems with my apache setup. I get a 404 error when > displaying

Apache Images

2007-03-04 Thread Fes
Hi, I am having problems with my apache setup. I get a 404 error when displaying images. My settings file is: MEDIA_ROOT = 'C:\Program Files\Apache Software Foundation \Apache2.2\htdocs\media\images' MEDIA_URL = 'http://'+ get_ip_address()+'/images/' And I have the following in my .conf file

Re: Images Won't Include

2007-01-28 Thread James Bennett
che and mod_python, then for performance reasons it's recommended that you serve images and other "media" files like JavaScript and stylesheets from a separate web server instance; for example, the Journal-World's website at http://www.ljworld.com/ serves all its images and other media from http://media.

Images Won't Include

2007-01-28 Thread NathanWithAnN
When I try to include an image like I would in any other website, the image does not display. How do I configure the urls to treat an image like an image so they can be displayed? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: 'blog entries' with multipe inline images

2007-01-18 Thread Ramdas S
wsitem, problem solved, but that's only for a fixed number of images. I could also create a separate image model, maken an M2M relation to the newsitems and upload and manage the images separately. But 'off course' I don't want a list at the end of each newsitem with the image listed, I want them

Re: 'blog entries' with multipe inline images

2007-01-18 Thread David Zhou
On Jan 18, 2007, at 11:00 AM, Fred wrote: You just upload the images to a directory and reference them using plain good old html? Please say it ain't so... ;-) It's what I do, giving it a right or left class as needed. It's easy, works, and flexible in that I can put the images wherever

'blog entries' with multipe inline images

2007-01-18 Thread Fred
to such a newsitem, problem solved, but that's only for a fixed number of images. I could also create a separate image model, maken an M2M relation to the newsitems and upload and manage the images separately. But 'off course' I don't want a list at the end of each newsitem with the image listed, I want them inline

Re: Displaing Images and Static Paths

2006-12-23 Thread Osso
http://www.djangoproject.com/documentation/static_files/ --~--~-~--~~~---~--~~ 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

Displaing Images and Static Paths

2006-12-23 Thread jason . leach
Hi: Sorry for the lame question but this not at all obvious for a new user to Django. I can get my templates to display just fine, but I can't get the images in them to appear and I don't want to write a view for all my imags. Bahhh. I keep images in /i/ in the template directories: like i

Re: Bug? -- Scripting to Store Images Throws Exception but Still Successfully Stores Image

2006-12-21 Thread Paul Childs
Thanks Fredrik you saved me some nerve cells. Your answer worked like a charm. Of note: I noticed that there was no need to call the save() method on the photo since the save_image_file() [ie save_FIELD_file()] method saved all photo fields to the database. This means that I had to set all

Re: Bug? -- Scripting to Store Images Throws Exception but Still Successfully Stores Image

2006-12-20 Thread Fredrik Lundh
Paul Childs wrote: I have a lot of images for the initial load and want to use a script to get them into the database. > When I try to store the image in my Photo model (see the below) I get an error. C:\Python24\lib\site-packages\django\db\models\base.py in _save_FIELD_file(self, fi

Re: Bug? -- Scripting to Store Images Throws Exception but Still Successfully Stores Image

2006-12-20 Thread Paul Childs
The funny thing is that I can go on and set the ssi_status, caption and then execute save() and it will store everything to the database. Is this a bug? I'm using the latest svn trunk. On closer inspection the files that are stored on the server are zero bytes but all the database entries

Bug? -- Scripting to Store Images Throws Exception but Still Successfully Stores Image

2006-12-20 Thread Paul Childs
I have a lot of images for the initial load and want to use a script to get them into the database. When I try to store the image in my Photo model (see the below) I get an error. The funny thing is that I can go on and set the ssi_status, caption and then execute save() and it will store

Re: Storing images in the db

2006-10-31 Thread Jay Klehr
their mind on the issue, which gives you another perspective on the issues at hand. Jay Panos Laganakos wrote: > I'm going to work a small photo managment app for an LAN site here, and > I wanted to hear some opinions. > > >From what I've seen people tend to store images outside the db

Storing images in the db

2006-10-31 Thread Panos Laganakos
I'm going to work a small photo managment app for an LAN site here, and I wanted to hear some opinions. >From what I've seen people tend to store images outside the db and just keep their location field to grab em. What are the advantages/disadvantages of doing so? That way the httpd g

Re: adding images to my content

2006-10-16 Thread RajeshD
works. Or god forbid drag and drop! ;) > > As a quick fix, in the admin list page for your images, you could add a > > custom column that does show the correct (Markdown-friendly) path for > > each image. The user could then cut and paste that path into the > > Markdown based text

Re: adding images to my content

2006-10-16 Thread RajeshD
t; As a quick fix, in the admin list page for your images, you could add a custom column that does show the correct (Markdown-friendly) path for each image. The user could then cut and paste that path into the Markdown based text where needed. --~--~-~--~~~---~--~

adding images to my content

2006-10-16 Thread Milan Andric
Hello, I can serve my static files no problem, in apache I did SetHandler None and an Alias /media /homedir/djangostuff/myapp/media. The trick comes in the process or flow of adding files/images into a body of text. I'm adding content to the db through the admin and using markdown

Re: serving static images

2006-09-26 Thread Tom Smith
On 10 Sep 2006, at 16:52, Allan Henderson wrote: > > Complete newbie problem here but i can't seem to get django to show > any images or stylesheets etc. > > In urls.py: > > (r'^images/(?P.*)$', 'django.views.static.serve', > {'document_root': '/Users/whiteboo

Re: Remote Images and Django

2006-09-26 Thread Malcolm Tredinnick
On Tue, 2006-09-26 at 12:42 +0100, Tom Smith wrote: > Nearly there with this code... > > from PIL import Image,ImageFile > def get_image(src): > import urllib > > fp = urllib.urlopen(src, "rb") > p = ImageFile.Parser() > > while 1: > s = fp.read(1024)

Re: serving static images

2006-09-26 Thread Filipe
What about using MEDIA_ROOT instead of STATIC_LOC? isn't MEDIA_ROOT's purpose the same? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Remote Images and Django

2006-09-26 Thread Tom Smith
Hello, I'm trying to write a very simple script that takes a list of URLs for images and gets their data... resizes them to 110x110 (hopefully preserving aspect ratio) and then puts that data into an ImageField obj... any pointers gratefully received tom

Re: Remote Images and Django

2006-09-26 Thread Tom Smith
Nearly there with this code... from PIL import Image,ImageFile def get_image(src): import urllib fp = urllib.urlopen(src, "rb") p = ImageFile.Parser() while 1: s = fp.read(1024) print ".", if not s:

Re: serving static images

2006-09-11 Thread Jay Parlar
On 9/11/06, Allan Henderson <[EMAIL PROTECTED]> wrote: > > That's so obvious now that you point that out, I don't know how I > could have missed that. Really thanks a million Jay! it all works > perfectly now. > Glad it worked for you. One last thing you might want to consider is adding this to

Re: serving static images

2006-09-11 Thread Allan Henderson
That's so obvious now that you point that out, I don't know how I could have missed that. Really thanks a million Jay! it all works perfectly now. Allan On 11 Sep 2006, at 18:14, Jay Parlar wrote: > > On 9/11/06, Allan Henderson <[EMAIL PROTECTED]> wrote: >> >> i'll give you the settings

Re: Re: serving static images

2006-09-11 Thread Jay Parlar
On 9/11/06, Allan Henderson <[EMAIL PROTECTED]> wrote: > > i'll give you the settings file too- here you go! bear in mind i've > been changing things within so likely has changed from last time. > Thanks for all this. > > > URLS.PY > from django.conf.urls.defaults import * >

Re: Re: serving static images

2006-09-11 Thread Allan Henderson
refix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/;, "/media/". ADMIN_MEDIA_PREFIX = "/media/" # Make this unique, and don't share it with anybody. SECRET_KEY = 'xxx' # List of callables that kn

Re: serving static images

2006-09-11 Thread Allan Henderson
Removed the path bit, navigating to http://localhostL:8000/static gets me: ViewDoesNotExist at /static/ Could not import janeraven.products.views.django.views.static. Error was: No module named django.views.static Allan On 11 Sep 2006, at 14:57, Jay Parlar wrote: > > On 9/12/06, Allan

Re: Re: serving static images

2006-09-11 Thread Jay Parlar
On 9/12/06, Allan Henderson <[EMAIL PROTECTED]> wrote: > > Thanks Jay but that doesn't appear to make any difference. I wonder > is it how i have settings.py set up but nothing jumps out at me when > trying to find where I've gone wrong. Don't know if its important but > I'm on a mac and I'm

Re: Re: serving static images

2006-09-11 Thread Allan Henderson
09/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > On 9/10/06, Alfonso <[EMAIL PROTECTED]> wrote: > > > > Complete newbie problem here but i can't seem to get django to show > > any images or stylesheets etc. > > In urls.py: > > > > (r'^images

serving static images

2006-09-10 Thread Alfonso
Complete newbie problem here but i can't seem to get django to show any images or stylesheets etc. In urls.py: (r'^images/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/whitebook/django/django_projects/mysite/ media/images'}), In the template I have . So when opening

serving static images

2006-09-10 Thread Allan Henderson
Complete newbie problem here but i can't seem to get django to show any images or stylesheets etc. In urls.py: (r'^images/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/whitebook/django/django_projects/mysite/ media/images'}), In the template I have . So when

Re: Returning images with Django

2006-09-05 Thread Filipe
I see. thanks. --~--~-~--~~~---~--~~ 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

Re: Returning images with Django

2006-09-05 Thread Ned Batchelder
Filipe wrote: Ian Holsman wrote: im = Image.open('%s/blah.jpg' % settings.MEDIA_ROOT ) resp = HttpResponse( mimetype="image/jpeg" ) im.save( resp, 'JPEG' ) return resp ? yeah, precisely! thanks. although it works perfectly there's something I don't quite

Re: Returning images with Django

2006-09-05 Thread Filipe
Ian Holsman wrote: > im = Image.open('%s/blah.jpg' % settings.MEDIA_ROOT ) > resp = HttpResponse( mimetype="image/jpeg" ) > im.save( resp, 'JPEG' ) > return resp > ? yeah, precisely! thanks. although it works perfectly there's something I don't quite understand (i'm still a newbie

Re: Returning images with Django

2006-09-04 Thread charles sibbald
ngo-users@googlegroups.com>Sent: Monday, September 4, 2006 12:09:40 PMSubject: Returning images with DjangoHi all,I need to make some images available on my django website that arestored on an internal file server. The idea would be that Django wouldbe listening to requests for those images, the

Re: Django working but cant load stylesheet or images on my app

2006-08-28 Thread casibbald
Hi Malcom, So you mean something like this: if settings.DEBUG: urlpatterns += patterns('', (r'^images/(?P.*)$', 'django.views.static.serve', {'document_root': '/var/www/vhosts/opentelcom.org/openbilling/media'}), ) and then in my template i can refer to an image as follows

Re: Django working but cant load stylesheet or images on my app

2006-08-28 Thread Malcolm Tredinnick
quot;GET /polls/ HTTP/1.1" 200 4016 > [27/Aug/2006 17:16:56] "GET /stylesheets/base.css HTTP/1.1" 404 2270 > [27/Aug/2006 17:16:56] "GET /images/logo.gif HTTP/1.1" 404 2255 It looks like you have set up your url configuration to send things under the site_media/ path t

Re: Django working but cant load stylesheet or images on my app

2006-08-28 Thread charles sibbald
Hi Malcom.Ive tried this and it does not work "Static setting"any other ideasregardscharles- Original Message From: Malcolm Tredinnick <[EMAIL PROTECTED]>To: django-users@googlegroups.comSent: Monday, August 28, 2006 7:32:17 PMSubject: Re: Django working but cant load styl

Re: Django working but cant load stylesheet or images on my app

2006-08-28 Thread Malcolm Tredinnick
but with > my own templates I can not get my stylesheet or images loaded. See http://www.djangoproject.com/documentation/static_files/ . Regards, Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Django working but cant load stylesheet or images on my app

2006-08-28 Thread casibbald
Hi everyone, I have been learning django and got my devel server up and running, I can access the admin section after going though the tutorial. I have got my own application going, and running the examples but with my own templates I can not get my stylesheet or images loaded. the following

Django working but cant load stylesheet or images on my app

2006-08-28 Thread charles sibbald
Hi everyone,I have been learning django and got my devel server up and running, I can access the admin section after going though the tutorial.I have got my own application going, and running the examples but with my own templates I can not get my stylesheet or images loaded.the following is my

Re: Upload images to rich-editor in admin interface

2006-08-20 Thread Scater
Nathan R. Yergler wrote: > I was working on this yesterday and have a working Django application > that supports most of the API. I'll be working on finishing it up > today, and will release it tomorrow or Tuesday, depending on when I get > things cleaned up. Anyway, that may make FCKeditor a

Re: Upload images to rich-editor in admin interface

2006-08-20 Thread Nathan R. Yergler
FCKeditor has an XML API that can be implemented on the server side to support the upload/browse functionality for images, etc. (see http://fckeditor.wikiwikiweb.de/Developer's_Guide/Participating/Server_Side_Integration#Browser). I was working on this yesterday and have a working Django

Upload images to rich-editor in admin interface

2006-08-20 Thread Scater
I have simple model: class Entry(models.Model): ... body = models.TextField() ... And i use rich-editor like TinyMCE or FCKEditor etc in admin-interface. for edit a field "body" I need functionality of uploading images for user's computer to this editor directly. I understand tha

Re: Compress images on upload?

2006-08-15 Thread Bryan Chow
On 8/13/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > http://www.verdjn.com/wiki/PhotoField > > Beautiful, now it's worth my time ;-) > > Seriously, thanks a lot. > Jay P You're welcome, Jay! Please drop us a line and let us know if you have any questions, comments, or suggestions about the

Re: Compress images on upload?

2006-08-13 Thread Jay Parlar
On 8/13/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > > Optional parameter for JPEG quality added :) > > http://www.verdjn.com/wiki/PhotoField Beautiful, now it's worth my time ;-) Seriously, thanks a lot. Jay P. --~--~-~--~~~---~--~~ You received this message

Re: Compress images on upload?

2006-08-13 Thread Bryan Chow
Optional parameter for JPEG quality added :) http://www.verdjn.com/wiki/PhotoField On 8/12/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > Hi Jay, > > Here's a custom field that automatically resizes the uploaded image > using PIL. You should be able to modify save_file() to adjust the JPEG >

Re: Compress images on upload?

2006-08-13 Thread Nebojša Đorđević
On 12 Aug 2006, at 06:58, Jay Parlar wrote: And just to note, I tried doing compression with PIL in my model's save() method. The problem is that files aren't written to disk until *after* the save() method is complete. You can look at http://trac.studioquattro.biz/djangoutils/wiki/

Re: Compress images on upload?

2006-08-12 Thread Bryan Chow
Bryan On 8/11/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > Anybody have any code lying around to automatically compress JPEGs > that are uploaded in the Admin via a FileField/ImageField? Many of my > users aren't in a position to know how to compress images themselves, > and

Re: Compress images on upload?

2006-08-11 Thread Jay Parlar
And just to note, I tried doing compression with PIL in my model's save() method. The problem is that files aren't written to disk until *after* the save() method is complete. Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Compress images on upload?

2006-08-11 Thread Jay Parlar
Anybody have any code lying around to automatically compress JPEGs that are uploaded in the Admin via a FileField/ImageField? Many of my users aren't in a position to know how to compress images themselves, and our site certainly doesn't need full quality JPEGs. Jay P

Re: manipulating images

2006-06-21 Thread kwe
thanks, that works great. --~--~-~--~~~---~--~~ 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

Re: manipulating images

2006-06-21 Thread Doug Van Horn
I'm no expert either, but this seems to work for me: fp = StringIO() myImage.save(fp, 'jpeg') # or whatever format self.save_thumbnail_file(myName, fp.getvalue()) Nice thread. I was just fixin' to get to this for my demo app. Thanks! doug.

Re: manipulating images

2006-06-21 Thread mwtb
kwe wrote: > I guess this means "if the PIL Image class can be used directly as > input to the save_FIELD_file() call." - it can't ? > > sorry new to python and just want to check I'm reading the error > correctly. Any ideas on how to change the type? Again, I'm not somewhere I can confirm

Re: manipulating images

2006-06-21 Thread kwe
Request Method: POST Request URL:http://localhost:8000/admin/photos/photo/add/ Exception Type: TypeError Exception Value:argument 1 must be string or read-only buffer, not instance Exception Location:

Re: manipulating images

2006-06-20 Thread Phil Powell
It might be worth you taking a look at the work done on Thumbnails in DjangoUtils: http://djangoutils.python-hosting.com/wiki/Thumbnails Although not a solid chunk of code (there are a few issues with namespaces, and it uses some Python 2.4 specific stuff), but with a bit of hacking I got

Re: manipulating images

2006-06-20 Thread mwtb
Sasha wrote: > def save(self): > super(Picture, self).save() > if self.image and not self.thumbnail: > import Image > myImage = Image.open(self.get_image_filename()) > myImage.thumbnail((150,150))

manipulating images

2006-06-20 Thread Sasha
Hello, I'd like to create a thumbnail for an image after it has been uploaded. I have seen two possible approaches descibed here - subclassing ImageField and overriding the save() method of the model. Although the former seems more elegant, the latter seems like less work and I'm inclined to try

Newbie: manuell ordering / Images

2006-05-21 Thread Manuel Meyer
Hi, I want to write a web site for tourists about the city I live in. A main component will be a sightseeing product: It consists of sights, that can be ordered in lists or in guided tours. As I am an absolute beginner in django, I need already help at this point: How can I add sights to

polls tutorial: How to delete choices and Images?

2006-04-29 Thread Manuel Meyer
= ('question', 'pub_date', 'was_published_today'), fields = ( (None, {'fields': ('question',)}), ('Date information', {'fields': ('pub_date',), 'classes': 'collapse'}), ('Images',{'fields':('image

Re: images path[please adrian help]

2006-01-18 Thread Kenneth Gonsalves
On Thursday 19 Jan 2006 9:35 am, Kenneth Gonsalves wrote: > On Thursday 19 Jan 2006 3:35 am, [EMAIL PROTECTED] wrote: > > 1- I write this in my page.py:  full_image = > > meta.ImageField(upload_to ="/media/images/", null = True, blank > > = True ) > > upload_t

[FWD: images path[please adrian help]]

2006-01-18 Thread mary . adel
> Dear ALL > I still have a problem with the picture feild here what i have done > 1- I write this in my page.py: full_image = meta.ImageField(upload_to > ="/media/images/", null = True, blank = True ) > 2-i opened the admin page and load the pictuer i need > i

images path[please adrian help]

2006-01-18 Thread mary . adel
Dear ALL I still have a problem with the picture feild here what i have done 1- I write this in my page.py: full_image = meta.ImageField(upload_to ="/media/images/", null = True, blank = True ) 2-i opened the admin page and load the pictuer i need i found that it creat a folder and

Re: Confused about where to put css and images

2006-01-09 Thread wiz
В Вск, 08/01/2006 в 16:24 -0500, Jeffrey E. Forcier пишет: > Oh, I see what you mean. I'm pretty sure you can just do an 'from > myproject import settings' in your view module, then throw the > variables from that into your template context, e.g. "context > ['MEDIA_URL'] =

Re: Confused about where to put css and images

2006-01-08 Thread Jeffrey E. Forcier
Oh, I see what you mean. I'm pretty sure you can just do an 'from myproject import settings' in your view module, then throw the variables from that into your template context, e.g. "context ['MEDIA_URL'] = settings.MEDIA_URL" and so forth. Regards, Jeff On Jan 8, 2006, at 2:00 PM, wiz

Re: Confused about where to put css and images

2006-01-08 Thread wiz
В Вск, 08/01/2006 в 11:42 -0500, Jeffrey E. Forcier пишет: > 0.9, but I'm not positive) generic view which lets you assign a URL > to a template directly without having to write a tiny custom view for > it. > http://www.djangoproject.com/documentation/generic_views/ Thanks, i'm already

Re: Confused about where to put css and images

2006-01-08 Thread Jeffrey E. Forcier
On Jan 8, 2006, at 3:20 AM, wiz wrote: Is there a `portable` way of writing urls / passing settings right to templates, w\o having to write custom views and such mess? I may be misunderstanding you, but there's a fairly new-ish (since there's no note about the development version, I assume

Re: Confused about where to put css and images

2006-01-08 Thread wiz
В Сбт, 07/01/2006 в 08:41 -0800, PythonistL пишет: > For the production server (Apache with mod_Python) I have in my > settings.py > MEDIA_ROOT = "C:/Django/TEMPLATES/Static/" #Python Syntax eventhough > MEDIA_URL = "/Media/" > For both( development and production server) then I use in my

Re: Confused about where to put css and images

2006-01-07 Thread aaloy
Hello! Thank you for your answer! 2006/1/7, PythonistL : > > For my development server I only have one more line in urls.py > > (r'^Media/(?P.*)', 'django.views.static.serve', {'document_root' > : 'C:/Django/TEMPLATES/Static/', 'show_indexes':True}), > This is quite the same

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2006-01-04 Thread limodou
2006/1/4, iGL <[EMAIL PROTECTED]>: > > on windows, MEDIA_URL and MEDIA_ROOT, did not quit help; I haven't > understood why... MEDIA_URL is used for file or image upload. > > all I did then was to put: > > in urls something like > r'^m/(?P.*)$', 'media', {'document_root': >

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2006-01-04 Thread iGL
on windows, MEDIA_URL and MEDIA_ROOT, did not quit help; I haven't understood why... all I did then was to put: in urls something like r'^m/(?P.*)$', 'media', {'document_root': 'D:\\django\\testapp\\media\\'}), and in views from django.views.static import serve media = serve and in the base

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2005-12-31 Thread wiz
On Птн, 2005-12-30 at 20:42 +, scum wrote: > I cannot figure out the `official` place to put images, stylesheets, > and javascripts and the process to access them. Can someone explain > their method of doing this. I'm just root-linking all that stuff to '/media/css/base.css'(js,

Images. Stylesheets. Javascripts. Where do I put 'em.

2005-12-30 Thread scum
I cannot figure out the `official` place to put images, stylesheets, and javascripts and the process to access them. Can someone explain their method of doing this. I was thinking of making a CSS_URL in the settings.py file and then calling {{CSS_URL}}/styles.css, but I can't manage

Re: inserting multiple images EASILY

2005-11-30 Thread Emanuele
It's just a name for me, but if you think it worth spending time on it I'll try! Cheers, Emanuele

Re: inserting multiple images EASILY

2005-11-30 Thread Emanuele
Thanks for your solution. For my case it is still a bit too complicate for users (my users, I mean). Anyway it really cool! Emanuele

Re: inserting multiple images EASILY

2005-11-30 Thread Kenneth Gonsalves
On Wednesday 30 Nov 2005 3:32 pm, Emanuele wrote: > Some friend sent me this advice for the problem: "webdav"; but > for me it is just a buzzword :) . I'll investingate this webdav > too. more than a buzzword - zope makes extensive use of webdav -- regards kg

Re: inserting multiple images EASILY

2005-11-30 Thread Emanuele
You got it. No misunderstanding. Images are on the client side and the web-app needs them on the server side in order to be associated with data in the form. The idea of having a client app to upload images is interesting. I'll look for it. Some friend sent me this advice for the problem

Re: inserting multiple images EASILY

2005-11-30 Thread Maniac
Waylan Limberg wrote: I imagine that is why online photo services (flickr) offer client side apps for batch uploading etc. Another way is to accept zip archives with pictures as a single file. But it assumes rather educated users. I'm currently doing such a service myself and for internet

Re: inserting multiple images EASILY

2005-11-29 Thread Waylan Limberg
On 11/29/05, Emanuele <[EMAIL PROTECTED]> wrote: > > Maybe it's a little off-topic, but I'm thinking about a problem I need > to solve for a future application I want to code using django. And I > think many of you can help me. > Basically users will need to insert multi

<    4   5   6   7   8   9   10   >