Re: newforms: saving relations via intermediary table

2007-07-05 Thread va:patrick.kranzlmueller
solution: user_extended_profile.userextendedprofilefavourites_set.all().delete() before inserting the new related object works. Am 05.07.2007 um 15:44 schrieb va:patrick.kranzlmueller: > > I´m having trouble using newforms with an intermediary table > (although I´m not sure that m

newforms: saving relations via intermediary table

2007-07-05 Thread va:patrick.kranzlmueller
I´m having trouble using newforms with an intermediary table (although I´m not sure that my problem relates to newforms anyhow). models: class UserExtendedProfile(models.Model): ... class UserExtendedProfileFavourites(models.Model): userextendedprofile =

Re: Calling System Commands

2007-06-26 Thread va:patrick.kranzlmueller
sorry, didn´t read carefully enough. the cookbook example refers to a template (not a view). patrick Am 26.06.2007 um 16:24 schrieb va:patrick.kranzlmueller: > > see: > http://code.djangoproject.com/wiki/PyCallTag > > patrick > > Am 26.06.2007 um 16:22 schrieb Moses Ting

Re: Calling System Commands

2007-06-26 Thread va:patrick.kranzlmueller
see: http://code.djangoproject.com/wiki/PyCallTag patrick Am 26.06.2007 um 16:22 schrieb Moses Ting: > > Does anyone know if it's possible to make a system command call from a > Django view? For example, I'd like to make the following call > straight from Django. > > import os >

newforms, unicode and umlauts

2007-06-21 Thread va:patrick.kranzlmueller
the code below does not give a validation error when typing umlauts, but the umlauts are not saved to the database. al_re = re.compile(r'^\w+$', re.UNICODE) def clean_last_name(self): if 'last_name' in self.cleaned_data: if not al_re.search(self.cleaned_data['last_name']):

Re: strange template-rendering with \xef\xbb\xbf

2007-06-05 Thread va:patrick.kranzlmueller
Am 05.06.2007 um 16:38 schrieb Malcolm Tredinnick: > > On Tue, 2007-06-05 at 16:10 +0200, va:patrick.kranzlmueller wrote: >> after doing a django-update yesterday, we have \xef\xbb\xbf at the >> beginning of every rendered template which leads to strange display >>

strange template-rendering with \xef\xbb\xbf

2007-06-05 Thread va:patrick.kranzlmueller
after doing a django-update yesterday, we have \xef\xbb\xbf at the beginning of every rendered template which leads to strange display errors in IE and older firefox-versions. I figured out that it´s a byte order mark (BOM), but I´m not sure how to avoid it ... patrick

Re: get objects in templates

2007-05-09 Thread va:patrick.kranzlmueller
just a guess. for the first image: {% for image in object.images.all.0 %} ... and for the rest: {% for image in object.images.all %} {% if not forloop.first %} ... note: what you described here (object.images.all) is not a foreignkey but a m2m-relationship. patrick. Am 09.05.2007 um 14:52

Re: complex data retrieval?

2007-05-02 Thread va:patrick.kranzlmueller
{{ screen.screening_time }} >> {% endfor %} >> {% endfor %} >> >> Go to this page:http://www.djangoproject.com/documentation/db-api/ >> and check out the one-to-many relationships, backward section. >> >> va:patrick.kranzlmueller wrote: >>>

Re: complex data retrieval?

2007-05-02 Thread va:patrick.kranzlmueller
}} >> {% for screens in cinema.cinemaprogram_set.all %} >> {{ screen.screening_date }} >> {{ screen.screening_time }} >> {% endfor %} >> {% endfor %} >> >> Go to this page:http://www.djangoproject.com/documentation/db-api/

Re: direct_to_template, extra_context

2007-02-27 Thread va:patrick.kranzlmueller
something? thanks, patrick Am 27.02.2007 um 17:36 schrieb Joseph Kocherhans: > > On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]> > wrote: >> >> why doesn´t this work? >> (r'^stars/', 'django.views.generic.simple.direct_to_template', >> {'tem

direct_to_template, extra_context

2007-02-27 Thread va:patrick.kranzlmueller
why doesn´t this work? (r'^stars/', 'django.views.generic.simple.direct_to_template', {'template': 'site/stars/stars_overview.html'}, extra_context= {'category': 'stars', 'subcategory': 'none'}), the error is "invalid syntax". thanks, patrick

podcast-feed

2007-02-20 Thread va:patrick.kranzlmueller
has anyone done a podcast-feed (iTunes) using django syndication? I know that it´s possible by changing feedgenerator.py. if somebody has already done it, it´d be great to share the code and/ or give some advice. thanks, patrick --~--~-~--~~~---~--~~ You

Re: per-view cache and CACHE_MIDDLEWARE_SECONDS

2007-01-18 Thread va:patrick.kranzlmueller
x = cache_page(x, 60 * 15) that´s right, isn´t it? Am 18.01.2007 um 17:35 schrieb Robert: Did you specify the timeout ? in your cache_page decorator ? -- Robert > --~--~-~--~~~---~--~~ You received this message because you are subscribed to

per-view cache and CACHE_MIDDLEWARE_SECONDS

2007-01-18 Thread va:patrick.kranzlmueller
I´m trying to use the per-view cache, but I get the error that CACHE_MIDDLEWARE_SECONDS is missing in settings.py: Error was: 'Settings' object has no attribute 'CACHE_MIDDLEWARE_SECONDS' why do I need this, I´m not using the middleware? thanks, patrick

Re: How to hack admin interface?...and should I?

2006-12-14 Thread va:patrick.kranzlmueller
Am 14.12.2006 um 17:05 schrieb Daniel Kvasnicka jr.: > > Hi djangees, > I'm a TurboGears user, I like CherryPy, Kid and so. I like Django as > well and tried the tutorials. > What I like about Django is (obviously) the auto-generated admin > interface. > > However, what I need to know is how >

Re: offtopic: delete *.pyc from subversion

2006-11-29 Thread va:patrick.kranzlmueller
thanks. Am 29.11.2006 um 17:51 schrieb Marcin Jurczuk: > > find . -name '*pyc' |xargs svn delete > to delete them: > find . -name '*pyc"|xargs rm -f > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

offtopic: delete *.pyc from subversion

2006-11-29 Thread va:patrick.kranzlmueller
in my svn-repository, I´m having *.pyc-files. question is: how do I get rid of these files? global-ignores is set to *.pyc now (after initial import and some changes). do I have to manually delete the pyc-files? since my svn-repos is django-related I dare to ask. thanks, patrick

seeking clarification: custom manipulator foreign key / many-to-many

2006-09-20 Thread va:patrick.kranzlmueller
for the last couple of hours, I´ve read all entries about custom manipulators but I´m still not able to get my stuff working. I probably just don´t see what´s wrong anymore: this is part of my MODEL: class UserProfile(models.Model): music = models.ManyToManyField(Music, blank=True,

Re: off-topic: why does it take so long for emails ...

2006-08-29 Thread va:patrick.kranzlmueller
I see. any chance to get me off the spam-list? kenneth: I didn´t check that before. yesterday it was on the web interface immediately and I was waiting for the e-mail for about half an hour. thanks, patrick Am 29.08.2006 um 05:14 schrieb Adrian Holovaty: > > On 8/28/06, patrickk <[EMAIL

translating app-name

2006-08-03 Thread va:patrick.kranzlmueller
the language-code for my site is german, but the app-names and the models are english. in the admin-interface, it´s no problem to have german names for the tables. but how can I change the names of my installed apps? thanks, patrick --~--~-~--~~~---~--~~ You

how to email a password

2006-07-18 Thread va:patrick.kranzlmueller
next problem with my user registration process: how do I send the password to registered users after they confirmed their registration? the process should look like this: 1. registration 2. email confirmation 3. account activation & email with username and password 4. now the user can log in

Re: FileBrowser Test Version

2006-07-11 Thread va:patrick.kranzlmueller
a new version of the filebrowser is available for download. CHANGES: 001: You may define an initial directory for each FileBrowseField by adding a path to the help_text: Like "FileBrowser: /images/blog/" or "FileBrowser: /documents/pdf/". 002: Sorting algorithm also works with Python 2.3 now

Re: FileBrowser Test Version

2006-07-11 Thread va:patrick.kranzlmueller
thanks. I will take a look at the bugs mentioned by archatas - so there'll probably be a new version for download later today. SVN: I´ve never worked with SVN (well, besides using django), no idea how to do the setup. It´d be very useful but I don´t have the time to digg into that right

Re: generic relations in the admin interface

2006-07-06 Thread va:patrick.kranzlmueller
7/6/06, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: >> >> just tested generic relations for tagging. >> to my surprise, there´s no possibility to enter tags (for my blog- >> entries) in the admin interface. >> >> however, i do get additional user permissions: "

generic relations in the admin interface

2006-07-06 Thread va:patrick.kranzlmueller
just tested generic relations for tagging. to my surprise, there´s no possibility to enter tags (for my blog- entries) in the admin interface. however, i do get additional user permissions: "can add tagged item", ... did I miss something? code: class TaggedItem(models.Model): """A tag

Re: dojo

2006-05-18 Thread va:patrick.kranzlmueller
uot;dojoType", "Editor2"); } } }, } addEvent(window, 'load', AddEditor.init); btw, i´ve tested this with m-r on Firefox 1.5. patrick Am 18.05.2006 um 13:07 schrieb va:patrick.kranzlmueller: > > i guess you mean the editor widget: > > 1. drop dojo (kitchen sink)

Re: dojo

2006-05-18 Thread va:patrick.kranzlmueller
i guess you mean the editor widget: 1. drop dojo (kitchen sink) into /media/ (like /media/dojo) 2. add this script as AddRichTextEditing.js into /media/js/admin/ ### this script looks for the help text "Rich Text Editing" and replaces the textarea before with the dojo widget var AddEditor = {

Re: hack for file-browser

2006-05-03 Thread va:patrick.kranzlmueller
> Am 02.05.2006 um 21:11 schrieb Adrian Holovaty: > >> >> On 5/2/06, va:patrick.kranzlmueller <[EMAIL PROTECTED]> >> wrote: >>> now i´d like to implement that browser for file- resp. image-fields. >>> i´m thinking about a "+" righ

Re: hack for file-browser

2006-05-02 Thread va:patrick.kranzlmueller
i still have to work on some stuff like multiple delete, rename, permissions ... it´ll be available soon. patrick Am 02.05.2006 um 15:28 schrieb [EMAIL PROTECTED]: > > On Tue, May 02, 2006 at 02:47:33PM +0200, va:patrick.kranzlmueller > wrote: >> i?m working on

hack for file-browser

2006-05-02 Thread va:patrick.kranzlmueller
i´m working on a file-browser for/with the django-admin. screenshots are here: http://www.vonautomatisch.at/django/ftp/ now i´d like to implement that browser for file- resp. image-fields. i´m thinking about a "+" right near an input-field, which opens another window where the user can select

slugify & umlauts

2006-04-11 Thread va:patrick.kranzlmueller
shouldn´t slugify resp. the SlugField convert umlauts? additionally: does anyone have an idea on how to convert umlauts "on the fly"? we´re having a tag-cloud where words have umlauts. still, we´d like to have the tags in the URL. thanks, patrick

Re: problem getting the admin to work (in tutorial)

2006-03-10 Thread va:patrick.kranzlmueller
see http://dev.mysql.com/doc/refman/4.1/en/charset-database.html http://dev.mysql.com/doc/refman/4.1/en/charset-table.html e.g. CREATE DATABASE db_name CHARACTER SET latin1 COLLATE latin1_swedish_ci; regards, patrick Am 10.03.2006 um 14:54 schrieb [EMAIL PROTECTED]: > > thanks, patrick.. i

Re: order_with_respect_to

2006-02-24 Thread va:patrick.kranzlmueller
good point.i´d still appreciate some help with my initial question though.thanks,patrickAm 24.02.2006 um 17:10 schrieb Amit Upadhyay:On 2/24/06, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote: class Filmstarts(meta.Model): id = meta.AutoField('ID', primary_key=True)Why are you

order_with_respect_to

2006-02-24 Thread va:patrick.kranzlmueller
i´m having the following model which gives me an error when trying to save something: class Filmstarts(meta.Model): id = meta.AutoField('ID', primary_key=True) film = meta.ForeignKey(Film, raw_id_admin=True) class META: order_with_respect_to = "film" admin =

Re: ManyToMany and Admin Interface

2006-02-24 Thread va:patrick.kranzlmueller
hmm, what about using "edit_inline" like: class Article(meta.Model): headline = meta.CharField(maxlength=100) publications = meta.ManyToManyField(Publication, edit_inline=meta.TABULAR) i didn't try that btw. patrick Am 24.02.2006 um 16:14 schrieb Philippe Mironov: > >

edit_inline & raw_id_admin

2006-02-24 Thread va:patrick.kranzlmueller
i have 2 tables, films and stars, each with lots of entries (>1). each film has a list of cast-members which relate to the table stars. i´m trying to do that relation using M2M with an intermediary table to add a job for every star (like actor, director, camera ...). class

Admin interface table detail showing incorrect number of entries

2006-02-24 Thread va:patrick.kranzlmueller
(sorry, i´ve accidentally replied to one of the previous messages) i´m having the problem described here: http://code.djangoproject.com/ticket/480 1. wrong numbers are displayed 2. it´s not possible to use the foreign keys for sorting - Exception Value: (1054, "Unknown column 'films.-id' in

Admin interface table detail showing incorrect number of entries

2006-02-24 Thread va:patrick.kranzlmueller
i´m having the problem described here: http://code.djangoproject.com/ticket/480 1. wrong numbers are displayed 2. it´s not possible to use the foreign keys for sorting - Exception Value: (1054, "Unknown column 'films.-id' in 'order clause'") any suggestions? thanks, patrick