trouble with yesno to generate images

2009-01-26 Thread Margie
Hi, I am trying to generate a symbol for true and false in my table, but am having problems with the escaping of quotes and also with generating the < > tags. If I use the code below: {{ task.done|yesno:"," }} it ends up generating this: < ends up being <, > ends up being > and

Re: Multiple images in form

2009-01-22 Thread A Melé
ah, I had to add a related_name to my ForeignKeys e.g: >     first_photo = models.ForeignKey(Image, blank=True, null=True, > related_name="first photo") > > The problem now is that with foreign keys, it generates a drop down > list to select the images - whereas, I want a browse

Re: Multiple images in form

2009-01-20 Thread DragonSlayre
Yeah, I had to add a related_name to my ForeignKeys e.g: first_photo = models.ForeignKey(Image, blank=True, null=True, related_name="first photo") The problem now is that with foreign keys, it generates a drop down list to select the images - whereas, I want a browse type text box

Re: Multiple images in form

2009-01-20 Thread Karen Tracey
On Tue, Jan 20, 2009 at 2:28 AM, DragonSlayre wrote: > [snip details of problem] > > This gives me loads of errors - i'm pretty sure it's because of the > ForeignKeys. > Without trying it, I'm guessing you got four errors. If they are the errors I think they are, the error

Re: Multiple images in form

2009-01-19 Thread DragonSlayre
title = models.CharField(max_length=200) body_text = models.TextField() #Listing images first_photo = models.ForeignKey(Image, blank=True, null=True) second_photo = models.ForeignKey(Image, blank=True, null=True) third_photo = models.ForeignKey(Image, blank=True, null=True) fo

Multiple images in form

2009-01-19 Thread DragonSlayre
Hi, I've seen some posts from a while back, but didn't find any real solution when searching to find out how to put multiple images (or any field for that matter) into a form (mainly a ModelForm) Basically what I want to have is a form that has a one to many relationship from a post to images

Re: FileBrowser: Easy access to generated images from the template?

2009-01-19 Thread Benjamin Buch
ogle.com/p/django-filebrowser/wiki/installationfilebrow >> ... >> ), >> and I like filebrowsers' image generator and want to use it. >> >> But how can I access the generated images from the template? >> Say I have the template variable 'news_report' in my tem

Re: FileBrowser: Easy access to generated images from the template?

2009-01-19 Thread patrickk
I coupledfilebrowserwith on of my models ('News') and use the   > FileBrowse-Field for this > (http://code.google.com/p/django-filebrowser/wiki/installationfilebrow... > ), > and I like filebrowsers' image generator and want to use it. > > But how can I access the generated images fr

FileBrowser: Easy access to generated images from the template?

2009-01-18 Thread Benjamin Buch
for this (http://code.google.com/p/django-filebrowser/wiki/installationfilebrowsefield ), and I like filebrowsers' image generator and want to use it. But how can I access the generated images from the template? Say I have the template variable 'news_report' in my template and want to display

Re: new django user - no images appear on my site :(

2009-01-13 Thread django_fo...@codechimp.net
gt; > I'm building my first django app and having a few problems in my dev > > environment.  I have a couple of images that I want to use in my > > base.html template.  I have tried various configurations, but none of > > my images show up.  I've tried putting the images in /me

Re: new django user - no images appear on my site :(

2009-01-12 Thread Brian Neal
On Jan 12, 6:45 pm, Brian Neal wrote: > On Jan 12, 4:58 pm, jazztpt wrote: > [...] > > > Brian, you understood me perfectly -- when I was asking about a tag, I > > was simply asking if django used a shortcut the way rails does, and > > {{MEDIA_URL}} is

Re: new django user - no images appear on my site :(

2009-01-12 Thread Brian Neal
On Jan 12, 4:58 pm, jazztpt wrote: [...] > > Brian, you understood me perfectly -- when I was asking about a tag, I > was simply asking if django used a shortcut the way rails does, and > {{MEDIA_URL}} is what I was looking for.  Duh.  :P > > However, {{MEDIA_URL}}

Re: new django user - no images appear on my site :(

2009-01-12 Thread jazztpt
hat's not the problem.  I had read that page, and another that > > suggested a slightly different syntax for the urlpatterns > > (fromhttp://rob.cogit8.org/blog).  Sorry that I forgot to mention that I > > had already put Rob's version in my code -- I wasn't sure if it was > >

Re: new django user - no images appear on my site :(

2009-01-12 Thread Daniel Roseman
already put Rob's version in my code -- I wasn't sure if it was > necessary simply to show any images anywhere on your site (the example > is of a set of images with a directory and links to each image). > > This is what is currently in my urls.py file, after my other > urlpatter

Re: new django user - no images appear on my site :(

2009-01-12 Thread Brian Neal
On Jan 12, 2:59 pm, jazztpt wrote: > > That page in the docs doesn't say anything about how to call this from > the view.  Are these files automatically accessed by an tag?  I > didn't see any special image tag (like the image_tag in rails) in the > template tags or in

Re: new django user - no images appear on my site :(

2009-01-12 Thread David Zhou
at I > had already put Rob's version in my code -- I wasn't sure if it was > necessary simply to show any images anywhere on your site (the example > is of a set of images with a directory and links to each image). Try a simple test: copy the generated URL for the image, and go there dir

Re: new django user - no images appear on my site :(

2009-01-12 Thread jazztpt
any images anywhere on your site (the example is of a set of images with a directory and links to each image). This is what is currently in my urls.py file, after my other urlpatterns (and yes, DEBUG is set to True): if settings.DEBUG: urlpatterns += patterns('', (r'^media/(?P

Re: new django user - no images appear on my site :(

2009-01-12 Thread Daniel Roseman
On Jan 12, 6:35 pm, jazztpt <annacalla...@gmail.com> wrote: > I'm building my first django app and having a few problems in my dev > environment.  I have a couple of images that I want to use in my > base.html template.  I have tried various configurations, but none of > my ima

new django user - no images appear on my site :(

2009-01-12 Thread jazztpt
I'm building my first django app and having a few problems in my dev environment. I have a couple of images that I want to use in my base.html template. I have tried various configurations, but none of my images show up. I've tried putting the images in /media, in /media/ img, and in the main

Re: How should I handle dynamically generated images?

2008-12-26 Thread Dave Dash
I currently serve up images via the DB vs. filesystem. I did this in order to keep the data in one place, but I now regret it. I'd recommend overriding the delete() of your image class to take care of deleting the related image from your storage. Depending on your needs and the amount of data

Re: How should I handle dynamically generated images?

2008-12-25 Thread burcu hamamcıoğlu
You can use this class in your models.py class Category(CommanInfo): name = models.CharField(max_length=30) display_name = models.CharField(max_length=30) list_image = models.FileField(upload_to="uploads/images",null=True, blank=True) to use the image in htm

How should I handle dynamically generated images?

2008-12-25 Thread Fluoborate
I have a website that generates images (PNG's of graphs), and I want those images to show up on the website, but I don't know how to do this. Is this possible: 1. Store the image file in an ImageField() in the SQLite 3 database. How do I do this? 2. Get the image from the database and easily

Re: problem in loading images.

2008-12-15 Thread Sura
l.com> wrote: > > > Hi djangonauts, > > I am new to django and i developed the site using django. > > My site works well in my system local server .. > > I hosted my site in dreamhost server and the url iswww.csmit.org > > But now in the site the images f

Re: problem in loading images.

2008-12-13 Thread Daniel Roseman
On Dec 13, 7:37 pm, Sura <ssrmi...@gmail.com> wrote: > Hi djangonauts, >         I am new to django and i developed the site using django. > My site works well in my system local server .. > I hosted my site in dreamhost server and the url iswww.csmit.org > But now in the

problem in loading images.

2008-12-13 Thread Sura
Hi djangonauts, I am new to django and i developed the site using django. My site works well in my system local server .. I hosted my site in dreamhost server and the url is www.csmit.org But now in the site the images fail to load as well as the media.. But i can access from the path

Re: how to deploy css and images with apache

2008-11-30 Thread l0he1g
any solution. > > I use apache+mod_python on windows,The problem is the css and images > > does't be imported anyway,as I did what "How to use Django with Apache > > and mod_python" told inhttp://docs.djangoproject.com/. > > > > > > > > I'm gu

Re: how to deploy css and images with apache

2008-11-30 Thread l0he1g
Thank you a lot ,I think I have solved it,by add the following to httpd.conf: Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all I think the docs of django who said " would be meaningless here." is misleading a lot. On 12月1日,

Re: how to deploy css and images with apache

2008-11-30 Thread Malcolm Tredinnick
On Sun, 2008-11-30 at 17:57 -0800, l0he1g wrote: > I am sorry adding a initial slash doesn't solve this problem,but thank > you for the same. > when I get http://localhost/static directly in browser,arise a 403 > message: > Forbidden > You don't have permission to access /static on this server.

Re: how to deploy css and images with apache

2008-11-30 Thread l0he1g
I am sorry adding a initial slash doesn't solve this problem,but thank you for the same. when I get http://localhost/static directly in browser,arise a 403 message: Forbidden You don't have permission to access /static on this server. when I get http:/localhost/,I inspect the adress of images

Re: how to deploy css and images with apache

2008-11-30 Thread Daniel Roseman
On Nov 30, 5:26 pm, l0he1g <[EMAIL PROTECTED]> wrote: > Hi,everyone,this is a beginner's first post,after a long,tired search > here and there without any solution. > I use apache+mod_python on windows,The problem is the css and images > does't be imported anyway,as I did what

how to deploy css and images with apache

2008-11-30 Thread l0he1g
Hi,everyone,this is a beginner's first post,after a long,tired search here and there without any solution. I use apache+mod_python on windows,The problem is the css and images does't be imported anyway,as I did what "How to use Django with Apache and mod_python" to

Re: Css and Images are missing

2008-11-15 Thread Luis Goncalves
Thanks so much ;) Its working :) -- Luis On Nov 15, 8:10 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Nov 15, 2008 at 10:49 AM, Luis Goncalves > <[EMAIL PROTECTED]>wrote: > > > > > > > Hello guys I need your help in here. > > > Sorry I am new in Django and I am having a problem, my

Re: Css and Images are missing

2008-11-15 Thread Karen Tracey
On Sat, Nov 15, 2008 at 10:49 AM, Luis Goncalves <[EMAIL PROTECTED]>wrote: > > Hello guys I need your help in here. > > Sorry I am new in Django and I am having a problem, my css and jpgs > are missing. > > I will write everything what i have and then maybe someone could give > me a hint :) > > >

Re: Css and Images are missing

2008-11-15 Thread Luis Goncalves
Well i saw this: "With that said, Django does support static files during development. You can use the django.views.static.serve() view to serve media files. The big, fat disclaimer¶ Using this method is inefficient and insecure. Do not use this in a production setting. Use this only for

Re: Css and Images are missing

2008-11-15 Thread Luke Seelenbinder
Django doesn't serve the media files, look at http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs Luke On Nov 15, 10:49 am, Luis Goncalves <[EMAIL PROTECTED]> wrote: > Hello guys I need your help in here. > > Sorry I am new in Django and I am having a problem, my css and jpgs

Css and Images are missing

2008-11-15 Thread Luis Goncalves
Hello guys I need your help in here. Sorry I am new in Django and I am having a problem, my css and jpgs are missing. I will write everything what i have and then maybe someone could give me a hint :) My settings.py: MEDIA_ROOT = '/home/lgoncalves/Arquivos/MyVitaminesShop/media/' MEDIA_URL =

Re: fetching images from database

2008-10-31 Thread Marcelo Ramos
On Fri, Oct 31, 2008 at 4:06 AM, please smile <[EMAIL PROTECTED]> wrote: > Hi All, > > I have uploaded some images in a folder and also saved the image name > into data base table. > Now I need to fetch and display all the images to my client side web page . > How ca

fetching images from database

2008-10-31 Thread please smile
Hi All, I have uploaded some images in a folder and also saved the image name into data base table. Now I need to fetch and display all the images to my client side web page . How can I do this .Please help. Thanks --~--~-~--~~~---~--~~ You received

Re: Django Admin - Does not see templates, images or templates.

2008-10-08 Thread Karen Tracey
On Wed, Oct 8, 2008 at 3:11 PM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > > > Of the other two, one claims to be Django 1.0 and one claims to be > > Django SVN trunk. Assuming they are what they claim to be, which one > > is the latest depends on whether the trunk checkout is from before or > >

Re: Django Admin - Does not see templates, images or templates.

2008-10-08 Thread NoviceSortOf
> Of the other two, one claims to be Django 1.0 and one claims to be > Django SVN trunk. Assuming they are what they claim to be, which one > is the latest depends on whether the trunk checkout is from before or > after 1.0. You might get a clue by looking at django/__init__.py in > both and

Re: Django Admin - Does not see templates, images or templates.

2008-10-08 Thread Carl Meyer
On Oct 8, 3:28 am, NoviceSortOf <[EMAIL PROTECTED]> wrote: > These 3 directories seem to contain many redundant files. > > /var/www/Django-1.0/django/ > /var/www/django-trunk/django/ > > /usr/lib/python2.3/site-packages/django/ > > How do I determine if one of these directories > contains a

Re: Django Admin - Does not see templates, images or templates.

2008-10-08 Thread Karen Tracey
On Wed, Oct 8, 2008 at 3:28 AM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > > > What version of Django are you running? These two patterns are from > > different Django versions. The first, with the include of > > 'django.contrib.admin.urls' was the old one -- that file does not exist > in > >

Re: Django Admin - Does not see templates, images or templates.

2008-10-08 Thread NoviceSortOf
> What version of Django are you running?  These two patterns are from > different Django versions.  The first, with the include of > 'django.contrib.admin.urls' was the old one -- that file does not exist in > Django 1.0.  The 2nd pattern, referring to 'admin.site.root', is what should > be

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread Karen Tracey
On Tue, Oct 7, 2008 at 10:50 AM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > > > Yes I restarted, but I also noticed in urls.py > > 2 distinct suggested admin url patterns... > > (r'^admin/', include('django.contrib.admin.urls')), > # (r'^admin/(.*)', admin.site.root), > > Commenting out the second

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread NoviceSortOf
Yes I restarted, but I also noticed in urls.py 2 distinct suggested admin url patterns... (r'^admin/', include('django.contrib.admin.urls')), # (r'^admin/(.*)', admin.site.root), Commenting out the second entry seems to correct the admin_urls problem. Why does the documentation suggest

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread Karen Tracey
On Tue, Oct 7, 2008 at 6:17 AM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > Thanks the link did the trick. > > The admin page though still loads rough, sometimes > taking 3 screen refreshes to get past a > "No module named urls" error - then it finally loads. > Did you restart Apache after making

Re: Django Admin - Does not see templates, images or templates.

2008-10-07 Thread NoviceSortOf
Thanks the link did the trick. The admin page though still loads rough, sometimes taking 3 screen refreshes to get past a "No module named urls" error - then it finally loads. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Django Admin - Does not see templates, images or templates.

2008-10-06 Thread Keith Eberle
ADMIN_MEDIA_PREFIX is set incorrectly. It should be a URL, not a filesystem path. If you want the admin media files served at http://myhost.com/media/, set the value to '/media/' (which is the default). To serve the admin media, just create a softlink to the admin media files on disk in your

Re: Resizing images when uploading

2008-10-06 Thread Juanjo Conti
Solved thanks to http://groups.google.com/group/django-users/browse_thread/thread/cae5c5a532a73b6d?pli=1 I was using image.resize instead of image.thumbnail. The second one resize in place. def save(self, **kwargs): super(Foto, self).save(**kwargs) path = self.image.path

Re: Resizing images when uploading

2008-10-06 Thread Juanjo Conti
Thanks for your reply, but... Whats resized? It's not in my namespace. 2008/10/4 varikin <[EMAIL PROTECTED]>: > > > > On Oct 3, 4:18 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote: >> Hi, I used to use a pre 1.0 svn version of Django. There I had this class: >> >> class Foto(models.Model): >>

Django Admin - Does not see templates, images or templates.

2008-10-06 Thread NoviceSortOf
I'm using Linux Fedora, Apache and mod_python. I have 3 dashboard.css candidates on my system but Django admin will not see any of them... - # locate dashboard.css [RETURNS]

Re: Resizing images when uploading

2008-10-04 Thread varikin
On Oct 3, 4:18 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote: > Hi, I used to use a pre 1.0 svn version of Django. There I had this class: > > class Foto(models.Model): >     descripcion = models.CharField(max_length=30, blank=True, > verbose_name=u"descripción") >     imagen =

Resizing images when uploading

2008-10-03 Thread Juanjo Conti
Hi, I used to use a pre 1.0 svn version of Django. There I had this class: class Foto(models.Model): descripcion = models.CharField(max_length=30, blank=True, verbose_name=u"descripción") imagen = models.ImageField(upload_to='imagenes', verbose_name=u"foto") inmueble =

Re: no images and blank? (SOLVED)

2008-09-19 Thread kaputnik
actually sorry, i figured this out (was specific to reviewboard and not django). On Sep 19, 11:23 am, kaputnik <[EMAIL PROTECTED]> wrote: > I setup reviewboard on a server running gentoo, managed to get it > working (i think) but the pages are all just black text with a white > background.  I

no images and blank?

2008-09-19 Thread kaputnik
I setup reviewboard on a server running gentoo, managed to get it working (i think) but the pages are all just black text with a white background. I have a feeling i'm missing something in the apache configuration? --~--~-~--~~~---~--~~ You received this message

Re: static.serve images from css template

2008-09-19 Thread Evgeny
On Sep 19, 3:33 pm, Evgeny <[EMAIL PROTECTED]> wrote: > On Sep 19, 2:53 pm, Daniel Roseman <[EMAIL PROTECTED]> > wrote: > > > Try putting an initial slash in your url: > > url(/site_media/images/img5.jpg) > > > -- > > DR. > > Tried this. Sti

Re: static.serve images from css template

2008-09-19 Thread Evgeny
On Sep 19, 2:53 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > Try putting an initial slash in your url: > url(/site_media/images/img5.jpg) > > -- > DR. Tried this. Still doesn't work. --~--~-~--~~~---~--~~ You received this message becau

Re: static.serve images from css template

2008-09-19 Thread Daniel Roseman
On Sep 19, 9:50 am, Evgeny <[EMAIL PROTECTED]> wrote: > Hi, > I have a problem with serving static images with > django.views.static.serve from urls defined in css file. > Everything works ok when an image is served by tag in the > html (), but it doesn't work > when th

static.serve images from css template

2008-09-19 Thread Evgeny
Hi, I have a problem with serving static images with django.views.static.serve from urls defined in css file. Everything works ok when an image is served by tag in the html (), but it doesn't work when the link to the same image is in a css file (url(site_media/ images/img5.jpg)). The css file

Re: Dynamic images

2008-09-17 Thread Kenneth Gonsalves
On Wednesday 17 Sep 2008 5:01:45 pm TKa wrote: > Because I need input from the Django models for the image I want to > call the drawing function from the view. I guess I could save the > image file to temporary folder and then link the image tag to that > file in Response but is there any better

Re: Dynamic images

2008-09-17 Thread TKa
Thank you for both of you for the fast reply. I'm still a Django newbie and I didn't know that the HttpResponse has these features. I suppose I need to study the HttpResponse documentation more carefully now. I will just need the basic web-formats so I think I will get things work with these

Re: Dynamic images

2008-09-17 Thread Daniel Roseman
On Sep 17, 12:31 pm, TKa <[EMAIL PROTECTED]> wrote: > Can anybody help me how to create dynamic images within Django? > Drawing the image with Python is not a problem but how to link the > created image to the httpResponse? > > Because I need input from the Django models

Re: Dynamic images

2008-09-17 Thread Fredrik Lundh
response = HttpResponse(mimetype=Image.MIME[format]) image.save(response, format) ... you may e.g. want to use "JPEG" for truecolor and grayscale images, and "PNG" for palette and bitone images: if image.mode == "P" o

Re: Dynamic images

2008-09-17 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-09-17, o godz. 13:31, przez TKa: > Can anybody help me how to create dynamic images within Django? > Drawing the image with Python is not a problem but how to link the > created image to the httpResponse? > > Because I need input from th

Dynamic images

2008-09-17 Thread TKa
Can anybody help me how to create dynamic images within Django? Drawing the image with Python is not a problem but how to link the created image to the httpResponse? Because I need input from the Django models for the image I want to call the drawing function from the view. I guess I could save

Re: Upload images to database

2008-09-08 Thread nsash
Yes, I need to store them in database. I need to do this from the django admin. Do I have to make a custom field in the model? Or additional field in the database which is blob type? How can I override the save method , so that the image to be uploaded in the database, not in the file system? On

Re: ModelForm, images and exclude

2008-09-04 Thread flynnguy
True but I wanted to organize my folder a bit because there's not just one photo per pet, there could be quite a lot more than one photo per pet. First, I'd rather not have a million _ at the end of a file because everyone named their file cute1.jpg. Anyway, I got it to work, code below. (It's

Re: ModelForm, images and exclude

2008-09-03 Thread TiNo
Question, why do you need to create a folder for every pet? Why not throw all pet photos in one folder?That would solve your problem as well. On Wed, Sep 3, 2008 at 2:49 PM, flynnguy <[EMAIL PROTECTED]> wrote: > > I looked at the save_m2m but I don't have any many to many fields so > that

Re: ModelForm, images and exclude

2008-09-03 Thread flynnguy
I looked at the save_m2m but I don't have any many to many fields so that wouldn't do me any good. The problem seems to lie in the fact that when I save the image, I need to know the pet ID so it can save it in the petid directory. Ie. os.path.join(settings.MEDIA_ROOT, 'pet_photos', pet_id,

Re: ModelForm, images and exclude

2008-09-03 Thread TiNo
Set .pet and .type null=True, save with commit=True, add the values, and save again? also see http://www.djangoproject.com/documentation/modelforms/#the-save-method on save_m2m after commit=False. And default does not work indeed, 'initial' does however; you pass it when creating the form

Re: ModelForm, images and exclude

2008-09-02 Thread flynnguy
Ok, some experimentation has yielded that the problem lies here: def photoDir(self, filename): "Callable method used to set directory of media below" return os.path.join('pet_photos', str(self.pet.id), filename) Basically what seems to be happening is that it tries to save the

Re: ModelForm, images and exclude

2008-09-02 Thread flynnguy
I tried the id thing which didn't seem to work but then when I tried the null thing I think I found out what is going on. It looks like the callable save bit for the photo is not getting a pet id so it doesn't know where to save it. Of course this is just a guess and I have no proof... some more

Re: ModelForm, images and exclude

2008-09-02 Thread Daniel Roseman
On Sep 2, 4:04 pm, flynnguy <[EMAIL PROTECTED]> wrote: > Found out what was causing the error but not why... > > It seems that when I tell my model to not exclude the "pet" field, > that everything works fine. (ie, I select a pet from the dropdown) > When I add it to the exclude list and try to

Re: ModelForm, images and exclude

2008-09-02 Thread flynnguy
Found out what was causing the error but not why... It seems that when I tell my model to not exclude the "pet" field, that everything works fine. (ie, I select a pet from the dropdown) When I add it to the exclude list and try to set it manually I get an error. What seems to work is allowing

Re: ModelForm, images and exclude

2008-09-02 Thread TiNo
You could check with the pdb debugger where the error is returned, and maybe you can also see what field is causing the problem. On Tue, Sep 2, 2008 at 3:34 PM, flynnguy <[EMAIL PROTECTED]> wrote: > > Thanks for the tips, I did know about the get_object_or_404 and had > that there originally but

Re: ModelForm, images and exclude

2008-09-02 Thread flynnguy
Thanks for the tips, I did know about the get_object_or_404 and had that there originally but I wanted to rule things out and was hoping if the pet_id didn't exist, that would throw an error I'm used to seeing. Unfortunately that seems to not be the problem. I did make the changes regarding the

Re: ModelForm, images and exclude

2008-08-31 Thread TiNo
On Fri, Aug 29, 2008 at 6:37 PM, flynnguy <[EMAIL PROTECTED]> wrote: > .. > However there are certain fields I want to set manually so I tried > this: > class AddPhotoForm(ModelForm): >class Meta: >model = Media >exclude = ('type', 'pet', 'views') > > def

ModelForm, images and exclude

2008-08-29 Thread flynnguy
I'm probably doing something stupid but this has bugged me all morning. I have a ModelForm form and a view to add info to a Media model I have. This works: class AddPhotoForm(ModelForm): class Meta: model = Media def add_pet_photo(request, pet_id): pet =

Re: Images in MySQL

2008-07-14 Thread lukeqsee
Thanks Oliver, hadn't researched that yet I have decided to use lighttpd to serve up the images now, looks to be much more reliable. On Jul 14, 11:48 am, Oliver Andrich <[EMAIL PROTECTED]> wrote: > Hi Luke, > > I have tried this in an asset management system I am currently  

Re: Images in MySQL

2008-07-14 Thread Oliver Andrich
Hi Luke, I have tried this in an asset management system I am currently implementing for my company, which is ment to store a lots of images (round about 300.000+). Generally it is a very bad idea, at least this is what I have found. I ignored this article http://mysqldump.azundris.com

Re: Images in MySQL

2008-07-14 Thread Marty Alchin
On Mon, Jul 14, 2008 at 11:02 AM, Rudolph <[EMAIL PROTECTED]> wrote: > Ticket 5361 provides a way to accomplish this by writing a custom > backend: > http://code.djangoproject.com/ticket/5361 > > The ticket is on the "maybe" list for 1.0! I was afraid someone would bring up that ticket on this

Re: Images in MySQL

2008-07-14 Thread Rudolph
Ticket 5361 provides a way to accomplish this by writing a custom backend: http://code.djangoproject.com/ticket/5361 The ticket is on the "maybe" list for 1.0! Rudolph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Images in MySQL

2008-07-14 Thread Marty Alchin
On Mon, Jul 14, 2008 at 10:41 AM, lukeqsee <[EMAIL PROTECTED]> wrote: > I know you can store images in a BLOB field in mysql, but is it > possible with Django models? Not out of the box, but you're free to create your own custom field[1] to do that for you. If you look hard eno

Images in MySQL

2008-07-14 Thread lukeqsee
I know you can store images in a BLOB field in mysql, but is it possible with Django models? Thanks, Luke --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: How to display the images in the template page under the django development server

2008-07-14 Thread Karen Tracey
On Mon, Jul 14, 2008 at 6:06 AM, rui <[EMAIL PROTECTED]> wrote: > Hi Eric, > > There is a bit about it in this excerpt: > > """ > MEDIA_ROOT > > Default: '' (Empty string) > > Absolute path to the directory that holds media for this installation. > Example: "/home/media/media.lawrence.com/" See

Re: How to display the images in the template page under the django development server

2008-07-14 Thread rui
Hi Eric, There is a bit about it in this excerpt: """ MEDIA_ROOT Default: '' (Empty string) Absolute path to the directory that holds media for this installation. Example: "/home/media/media.lawrence.com/" See also MEDIA_URL. MEDIA_URL Default: '' (Empty string) URL that handles the media

Re: How to display the images in the template page under the django development server

2008-07-13 Thread Eric Liu
inue learn. Thanks for you help. 2008/7/11 Arien <[EMAIL PROTECTED]>: > > On Fri, Jul 11, 2008 at 4:37 AM, Eric Liu <[EMAIL PROTECTED]> wrote: > > When I create a app and try to show a image in the the html ,I ran > > into trouble that is the images can't be shown i

Re: How to display the images in the template page under the django development server

2008-07-11 Thread Arien
On Fri, Jul 11, 2008 at 4:37 AM, Eric Liu <[EMAIL PROTECTED]> wrote: > When I create a app and try to show a image in the the html ,I ran > into trouble that is the images can't be shown in the page.following > is my page code: > > [...] > > [...] In HTML, the end

Re: How to display the images in the template page under the django development server

2008-07-11 Thread Kenneth Gonsalves
On 11-Jul-08, at 3:07 PM, Eric Liu wrote: > http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

RE: How to display the images in the template page under the django development server

2008-07-11 Thread Emily Rodgers
/. Hope this helps, Em _ From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Liu Sent: 11 July 2008 10:37 To: django-users@googlegroups.com Subject: How to display the images in the template page under the django development server Hi all I have a lot

Re: images in templates?

2008-06-01 Thread Daniel Roseman
On Jun 1, 9:51 pm, lindec <[EMAIL PROTECTED]> wrote: > Thanks!! I had the same problem adding external CSS and Javascript > files as well. This seems like an absurd problem to have, given that > its obvious that developers would want to add CSS/JS files to their > templates. I wonder why the

Re: images in templates?

2008-06-01 Thread lindec
Bishop <[EMAIL PROTECTED]> wrote: > Hi, the problem is (like you mentioned) django has no reference to > where your images are. > > A way i got around this was, adding a line to my urls.py that > contained a 'static' folder. for example: > > (r'^static/(?P.*)$',

Re: images in templates?

2008-06-01 Thread Jarred Bishop
Hi, the problem is (like you mentioned) django has no reference to where your images are. A way i got around this was, adding a line to my urls.py that contained a 'static' folder. for example: (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': 'C:/path-to-project/templates

images in templates?

2008-05-31 Thread lindec
So this might be a stupid question, but how exactly does one add an image to an HTML template in django? I can't seem to figure out where django thinks my images live. I just want to do, for example, and cannot get it to display. I've tried altering my MEDIA_ROOT, putting the image in the same

Re: How to use ImageField to save images to dynamic path

2008-04-23 Thread PENPEN
I'm not clear how it could be. Could you please explain it in detail? Many thanks! /BRs On Apr 23, 1:34 pm, "Eric Liu" <[EMAIL PROTECTED]> wrote: > Why don't you set 'images/' as a variant.then you can change it dynamically > > 2008/4/23, Rishabh Manocha <[EMAIL P

Re: How to use ImageField to save images to dynamic path

2008-04-22 Thread Eric Liu
Why don't you set 'images/' as a variant.then you can change it dynamically 2008/4/23, Rishabh Manocha <[EMAIL PROTECTED]>: > > > Yea, I don't think the method I described would work for directories > (or at-least I can't figure out how). It does, however, work if you >

Re: How to use ImageField to save images to dynamic path

2008-04-22 Thread Rishabh Manocha
ethe image to the MEDIA_ROOT not > MEDIA_ROOT/images. > > > class Thing(models.Model): > photo = models.ImageField( > upload_to='images/', blank=True, null=True) > > > class ThingForm(ModelForm): > class Meta: > model = Thing > > def thing_a

Re: How to use ImageField to save images to dynamic path

2008-04-22 Thread PENPEN
How do you mean of changing request.FILES there itself? I tried to add the directory to request.FILES but failed. Django ignored the directory and savethe image to the MEDIA_ROOT not MEDIA_ROOT/images. class Thing(models.Model): photo = models.ImageField( upload_to='images/', blank

Re: Some weird. In production, imagen is redirected to images

2008-04-21 Thread mamcxyz
Thanks, I take a look at your ideas... --~--~-~--~~~---~--~~ 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

Re: Some weird. In production, imagen is redirected to images

2008-04-21 Thread Peter Rowell
ing was edited for brevity. === http://www.paradondevamos.com/imagen/ <<== requested URL GET /imagen/ HTTP/1.1 <<== browser to server Host: www.paradondevamos.com HTTP/1.x 301 Moved Permanently <<== server response. Aha! Server: Apache Location: http://www.para

<    2   3   4   5   6   7   8   9   10   >