cannot save model to db

2008-09-30 Thread Manuel Meyer
Hey, I have a model for Thumbnail, but I cannot save it. It says: AttributeError: 'Thumbnail' object has no attribute 'id'. What is wrong? I use django 1.0-final-SVN-unknown thanks, Manuel Here is an example: >>> from portfolio.models import Photo, Thumbnail >>> p = Photo.objects.all()[0]

Re: cannot save model to db

2008-10-01 Thread Manuel Meyer
Am 30.09.2008 um 20:21 schrieb Rajesh Dhawan: > > You are overriding __init__ but not making sure to call the base > class's __init__ method which does a whole bunch of stuff whenever a > new instance of a Model class is created. This is most definitely > causing your problem. It's best not to ov

Re: cannot save model to db

2008-10-03 Thread Manuel Meyer
ilImage.ANTIALIAS) image.save(self.miniature_filename, image.format) ### Signals instead of overwriting __init__(self) from django.db.models.signals import post_init def thumb_init(sender, **kwargs): kwargs['instance'].process() kwargs['instance'].make_

remove inline item

2007-06-09 Thread Manuel Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hey, to a model Event i attach some images. But how can I delete images from an Event? If I use something like http://localhost:8000/moor/admin/doccms/eventimage/2/delete/ manually, the Image's sql entry will be removed, but a Error fol

Send a filter-pipline output to a template tag

2007-06-25 Thread Manuel Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hey, is it possible, to send a output, generated by a filter pipeline chain to a template tag? I want to split a page's tag, that is already processed by the reStructuredText filter and a link generation filter, in several subtexts to mix it

Re: Send a filter-pipline output to a template tag

2007-06-26 Thread Manuel Meyer
{% do_something el %} >{% endfor %} > {% endwith %} > > Regards, > Aidas Bendoraitis aka Archatas > > > On 6/25/07, Manuel Meyer <[EMAIL PROTECTED]> wrote: >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA256 >> >> Hey, >> >> i

Change date/datetime input string for admin-interface

2007-06-27 Thread Manuel Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hey, how can I change the string for date/datetime fields in the admin interface? 2007-08-15 should be changed to 15.8.2007 ("d.m.Y H:i") Thanks, Manuel -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (Darwin) iQEVAwUBRoJWtDOKNHIOcnYMAQj31g

Missing Plus-Sign over ManyToManyField

2007-07-12 Thread Manuel Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hey, from other projects, running on the same django instance, I know that there is a possibility to display a '+' icon located over the ManyToManyField, that allows u to add a new object to relate to. So - in my case - you could add a contact

Re: Missing Plus-Sign over ManyToManyField

2007-07-13 Thread Manuel Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Yes, of course... THANKS!!! > > You need to add the Admin class to ContactPerson > > -rob > > On Jul 12, 6:59 am, Manuel Meyer <[EMAIL PROTECTED]> wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA256

store user as owner automaticaly

2008-04-09 Thread Manuel Meyer
Hi, in a model Article i want to store the user who created the article. I have this: class Article(models.Model): owner = models.ForeignKey(User, null=True, blank=True) But I wonder, if it is possible, to set the owner in an overwritten save() method, as a drop-down list is

OneToOneField unchangeable

2008-04-10 Thread Manuel Meyer
Hey, I have a type Article in which i hold a Type HeaderImage within an OneToOneField-Relationship. When adding an article via contrib.admin interface everything works as expected. But if I edit an existing article, the drop-down list doesn't appear anymore. class Article(models.Model):

Re: OneToOneField unchangeable

2008-04-13 Thread Manuel Meyer
> No, that's they way it is documented as working. The one-to-one > field acts as the primary key for the model, and primary keys can't > be edited. From http://www.djangoproject.com/documentation/model- > api/#one-to-one-relationships: > > This OneToOneField will actually replace the prima

Re: OneToOneField unchangeable

2008-04-13 Thread Manuel Meyer
> On Sun, Apr 13, 2008 at 8:34 AM, Manuel Meyer > <[EMAIL PROTECTED]> wrote: > > > No, that's they way it is documented as working. The one-to-one > > field acts as the primary key for the model, and primary keys can't > > be edited. From http:

Threadedcomments works on Mac, but not on Debian

2008-04-19 Thread Manuel Meyer
Hey, as described here [1] I get an NoReverseMatch error on debian when using django-threadedcomments, while everything works well an mac. In both cases I use 0.97-pre-SVN-7436. Does anybody know this behaivior? Thanks, Manuel [1] http://groups.google.com/group/django-threadedcomments/ bro

Re: Threadedcomments works on Mac, but not on Debian

2008-04-22 Thread Manuel Meyer
I twisted some letters in the urls-entry Am 19.04.2008 um 22:28 schrieb Manuel Meyer: > Hey, > as described here [1] I get an NoReverseMatch error on debian when > using django-threadedcomments, while everything works well an mac. > > In both cases I use 0.97-pre-SVN-7436. &

How to get ':' in address?

2008-04-22 Thread Manuel Meyer
Hey, I wonder how to get a ':' (btw: what's its name in english?) in my url, so it is shown as : in the address and not as %3A . Like wikipedia does: http://en.wikipedia.org/wiki/Portal:Arts If i try def get_absolute_url(self): return '/top-category:'+self.title_plural it gets print

Identify fieldmodel for attributes of an given object

2008-04-30 Thread Manuel Meyer
Hey, I want to get the Fieldmodel(Charfield, TextField, SlugField...) of each member of any given object. What I have now is this: def search_objects_attributes(o): object_dir = dir(o) for i in object_dir: try: current_attribute = getattr(o

odd date problem with free threaded comments

2008-05-30 Thread Manuel Meyer
Hey, I am using Free threaded comments on a 0.97-pre-SVN-7436 site. I am developing on Mac and run the site on debian/apache2/mod_python. under debian i found a strange behavior: Some comments are pre-dated 7 hours. ie.: In my timezone it's 15:23. A new comment will be published with this time

KSS and django

2008-06-20 Thread Manuel Meyer
Did anyone succeed in integrating KSS in django? I tried to make the kss.django demo-app "coolwiki" run, but it didn't work: KeyError: 'Plugin is not registered: scriptaculous-effects' Where should the PlugIn be, where can I add it? Thanks, Manuel --~--~-~--~~~-

User's permissions not updated

2007-09-16 Thread Manuel Meyer
Hey, I added a class "News" to models.py of an installed app. But its permissions doesn't appear in the Change User View of the admin interface. Need it to be activated somehow? As superuser I can use News. I use .96-pre Thanks, Manuel --~--~-~--~~~---~--~~ Y

Re: User's permissions not updated

2007-09-16 Thread Manuel Meyer
To answer my own question: python manage.py syncdb > Hey, > > I added a class "News" to models.py of an installed app. But its > permissions doesn't appear in the Change User View of the admin > interface. Need it to be activated somehow? > As superuser I can use News. > I use .96-pre >

Either category or project added to category

2007-10-07 Thread Manuel Meyer
Hey, I have Category and Projects. Both can have a Category as parent = models.ForeignKey(Category). So it is possible, that Projects and Categories can have the same Category as parent. But what I want to have is, that any Category - that is parent for any Project - cannot be parent for an

Setting var in context by inclusion tag

2007-10-17 Thread Manuel Meyer
Hey, inside a inclusion tag I try to set a variable to the context. But in no template it is accessible. I followed http://www.djangoproject.com/documentation/ templates_python/#setting-a-variable-in-the-context If I print the context in [1], level is defined, but if I use {% debug %} not

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 guide

PIL/Freetype2 Problem

2006-07-06 Thread Manuel Meyer
Hi, I want to try automatic header-graphics according to this recipes: http://www.jacobian.org/2006/jun/30/improved-text-image-view/ and http://www.jacobian.org/2006/jun/30/improved-text-image-view/ But when i try to access http://localhost:8000/a/?text=this I get an error: Tracebac

Cant access via fastcgi

2006-09-04 Thread Manuel Meyer
Hi, I try to bring a django-project online via fastcgi, but i get following error: You don't have permission to access /home/myusername/public_html/ ultimateWeimar/django.fcgi/ on this server. my .htaccess looks like this AddHandler fastcgi-script .fcgi RewriteEngine On RewriteRule ^(media

polls tutorial: How to delete choices and Images?

2006-04-29 Thread Manuel Meyer
Hello list members! Since yesterday I am testing around with Django, and this GREAT tool impresses me a lot! So, I still play with the poll tutorial. I trying to make some improvements to it's code, to learn techniques I will use in future work. I.e. I added image-upload. Adding works perf