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
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 = models.ForeignKey(UserExten
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
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
> os.system('ech
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']):
is it possible to have a label-class with newforms?
e.g., when a field is required, it´d be nice to show that with the
label being bold or red or whatever.
moreover, it´d be possible to style individual labels (which is not a
common use-case, but it gives the designer more flexibility).
than
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
>>
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
--~--~-~--~-
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 sc
%}
>> {{ screen.screening_date }}
>> {{ 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.
&
{{ cinema }}
>> {% for screens in cinema.cinemaprogram_set.all %}
>> {{ screen.screening_date }}
>> {{ screen.screening_time }}
>> {% endfor %}
>> {% endfor %}
>>
>> Go to this page:http://www.djangoproject.com/documen
I´m having 2 models:
class CinemaProgram(models.Model):
cinema = models.ForeignKey(Cinema)
movie = models.ForeignKey(Movie, raw_id_admin=True)
class CinemaProgramDate(models.Model):
cinemaprogram = models.ForeignKey(CinemaProgram,
edit_inline=models.TABULAR, num_in_adm
hi,
it means that somewhere on your server there is a directory for file-
uploads - just point to that directory.
e.g., our media-structure looks like this:
within the media-directory (=settings.MEDIA_ROOT) we have some sub-
directories:
/admin/
/site/
/tinymce/
/uploads/
we want our editors
;, 'subcategory': 'none'}),
)
isn´t that supposed to work? did I miss 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
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
--~--~-~--~~~---~--~
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 receiv
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 t
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
--~--~-~--~~
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
> e
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
"Django
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
--~--~--
I have a model with blog-postings, assigned to a specific user - the
user is stored in the table "posting" via foreignkey.
the user is part of a grade, part of a school and part of a state -
all of which have overview-pages.
so, to get all the postings for a state I have to do the following:
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, null=T
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 PR
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 re
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
s
I´m trying to send an email to the user for activating his/her account:
right now it has the form /activate-account/?passwordhash×tamp-
of-date-joined
any better ideas?
thanks,
patrick
Am 17.07.2006 um 19:21 schrieb patrickk:
>
> thanks, I did use do_html2python ... but for the wrong manipula
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
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 no
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: "
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
reviousSibling.setAttribute("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:
&
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 = {
> 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
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 a file-brows
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 t
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
--~--~-~--~~~---~
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 fo
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 ar
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 = met
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:
>
> [EMAI
first think, then write -> problem solved!
Am 24.02.2006 um 15:37 schrieb 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 re
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 Cast(meta.Model)
(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 'ord
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
--~--~-~--
45 matches
Mail list logo