data not validating after image field added to model form

2011-07-17 Thread sq1020
I just added am image field to a model form but when I try to upload an image using the form, it gives me the following error saying that the data could not be validated. I don't understand though, what is it about the image that could not be validated? Is there any way to decipher this from this

Re: data not validating after image field added to model form

2011-07-17 Thread Michal Petrucha
On Sun, Jul 17, 2011 at 01:19:59AM -0700, sq1020 wrote: > I just added am image field to a model form but when I try to upload > an image using the form, it gives me the following error saying that > the data could not be validated. I don't understand though, what is > it about the image that coul

Django admin: naming subclass objects, fieldsets and displaying items from other class.

2011-07-17 Thread Petey
Hi 1. When in django.admin I want to pick a source from dropdown list it always lists every item as "source object". How I can modify it so it will show source_name from Source model? from django.contrib import admin from news.models import News, Comment, Source class NewsAdmin(admin.ModelAdmin

Re: Django admin: naming subclass objects, fieldsets and displaying items from other class.

2011-07-17 Thread Martin J. Laubach
1. Define a unicode method on Source that returns whatever you want to display. 2. Missing comma in one-element tuple. mjl -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.

Re: Django admin: naming subclass objects, fieldsets and displaying items from other class.

2011-07-17 Thread Petey
Both helped. 3rd problem to go ;) -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/1F7cf6lXgjMJ. To post to this group, send email to django-users@googlegr

Re: Django admin: naming subclass objects, fieldsets and displaying items from other class.

2011-07-17 Thread Daniel Roseman
On Sunday, 17 July 2011 10:49:37 UTC+1, Petey wrote: > > Both helped. > > 3rd problem to go ;) > https://docs.djangoproject.com/en/1.3/ref/contrib/admin/ - see the third bullet point. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

trouble going from django on Windows to Ubuntu using Eclipse & Aptana Studio

2011-07-17 Thread Doug Snyder
Hi I'm pretty new to Django but I had an app working OK so far in WIdnows in Eclipse with the Aptana Studio plugin. I installed Eclipse and Aptana on a Ubuntu 11 machine and copied the code into a new project and when I try to run the (development) server I get some errors in django itself that are

Re: trouble going from django on Windows to Ubuntu using Eclipse & Aptana Studio

2011-07-17 Thread Venkatraman S
Well, i would recommend that you use a simple editor(like vim in linux) or Programmer's Notepad(in windows) for development in django/python. It is much easier to develop and also helps you keep your development environment 'lightweight'. An IDE is required only for languages like Java, where ther

.exclude method generating incorrect sql?

2011-07-17 Thread Jeremy
I have a query where it looks like Django 1.3 is generating incorrect sql. It involves these four models. class Aaa(models.Model): pass class Bbb(models.Model): aaa = models.ForeignKey(Aaa, related_name='bbbs') class Ccc(models.Model): bbb = models.ForeignKey(Bbb, related_name='cccs'

Multiple Databases || External Databases

2011-07-17 Thread Lycan
I am building a Django User profile management portal. In one of the sections of the website i need pull data from an external database(Its managed by someone else, i have access to it). How can i achieve this and also can someone please point me to a working example. Thanks -- You received thi

Django - can't open image in model save()

2011-07-17 Thread galgal
def upload_path_handler(instance, filename): return filename class SpectacleGallery(models.Model): image = models.ImageField(upload_to=upload_path_handler) def save(self, *args, **kwargs): Image.open(self.image) super(SpectacleGallery, self).save(*args, **kwargs) When I try to open it I ge