In general no, but in this simple usage it is posible. Writing from memory,
the names will be wrong:
class Info(models.Model)
...fields
def article_context_rendered(self):
t = templates.from_string(self.article_context)
return t.render({'info':self};
And in the template
On Fri, Oct 23, 2009 at 9:25 AM, Gerard wrote:
>
> Hi All,
>
> I'm trying to find a way to filter on a certain field (myowner) in my views.
> If the field in the returned queryset is not unique then raise an exception.
> The code in my manager:
>
> class
ion data. There
> is no request/response loop right?
>
> PS: Monkey patching... very nice this :)
>
> On 23 Jun., 13:38, Matías Costa <m.costac...@gmail.com> wrote:
> > Monkey patch django.db.model.save
> > Where? in manage.py?
> >
> > On Tue, Jun 23, 2
Monkey patch django.db.model.save
Where? in manage.py?
On Tue, Jun 23, 2009 at 12:56 PM, ReneMarxis wrote:
>
> what i forgot to say: Of course i don't like to change all models-
> code. Some 'global' solution is what i am looking for.
> >
>
2009/4/22 Matías Costa <m.costac...@gmail.com>
> On Wed, Apr 22, 2009 at 12:12 PM, srini <srinivas...@gmail.com> wrote:
>
>>
>> Hi,
>> Matías Costa
>>
>> well in the document it says either we can use sorl or whoosh,
>>
>> i did not hea
On Wed, Apr 22, 2009 at 12:12 PM, srini <srinivas...@gmail.com> wrote:
>
> Hi,
> Matías Costa
>
> well in the document it says either we can use sorl or whoosh,
>
> i did not heard about pysorl anywhere in the document
>
> so, if pysorl is the one which is neede
On Tue, Apr 21, 2009 at 1:29 PM, srini wrote:
> Exception Location: /usr/lib/python2.5/site-packages/
> Whoosh-0.1.13-
> py2.5.egg/whoosh/fields.py in name_to_number, line 339
>
That django_ct_s seems pysolr related, and you are using woosh. May be there
is a
On Tue, Mar 24, 2009 at 1:55 PM, benjamin.wins...@googlemail.com <
benjamin.wins...@googlemail.com> wrote:
>
> Hello
>
> I have created a more robust login mechanism for my site, using
> username and password but then also other information, specific to
> each user. My main login works fine, but
On Tue, Mar 24, 2009 at 4:10 PM, Rit wrote:
>
> How can I set an ImageField of a model from within the Python shell?
> >
>
ImageField and FileField are just strings. They get special treatment in
forms, OK, but your model instance attribute is just a string.
On Tue, Mar 17, 2009 at 9:28 PM, 3xM <3...@detfalskested.dk> wrote:
> I'll upgrade to Ubuntu 8.10 (with django 1.0) as soon as possible and
> get back to tell if solved the problem.
>
I imagine you can upgrade django without upgrade the whole OS. Try to
uninstall 0.96 (apt-get), download 1.1 and
2009/3/16 Matías Costa <m.costac...@gmail.com>
> On Sun, Mar 15, 2009 at 2:54 PM, 3xM <3...@detfalskested.dk> wrote:
>
>>
>> Gees... It messed with my link. I'll try again:
>> http://blackfin.cannedtuna.org/django-testcase.tar.gz
>> >>
>
On Sun, Mar 15, 2009 at 2:54 PM, 3xM <3...@detfalskested.dk> wrote:
>
> Gees... It messed with my link. I'll try again:
> http://blackfin.cannedtuna.org/django-testcase.tar.gz
> >
>
It works OK here. I have added __rerpr__ method to models to get a clear
output:
for p in Project.objects.all():
I love lightboxes
http://particletree.com/features/lightbox-gone-wild/
If you enable the auth middleware you can do:
{% if user.is_authenticated %}
{% else %}
{% endif %}
or in the view return a 400 forbidden and just in javascript (jquery code):
$.ajax({
url:"do_vote_url",
On Tue, Jan 27, 2009 at 6:42 PM, JonUK wrote:
>
> Apologies for the daft question, but after 10 mins of trawling through
> the official docs and various random google articles, I cannot find
> thyis info.
django.forms.widgets
>
> http://www.djangosnippets.org/snippets/12/
>
> On Tue, Jan 13, 2009 at 11:03 AM, Matías Costa <m.costac...@gmail.com>
> wrote:
>>
>> Fast answer: No
>>
>> Better awswer: No, but you can get one on djangosnippets.org
>>
>> On Mon, Jan 12, 2009 at 2:44 PM, rabbi
Fast answer: No
Better awswer: No, but you can get one on djangosnippets.org
On Mon, Jan 12, 2009 at 2:44 PM, rabbi wrote:
>
> is there a greater than method in the template language?
> >
>
--~--~-~--~~~---~--~~
You received this
On Fri, Jan 9, 2009 at 9:59 AM, Flo Ledermann
wrote:
>> No. Don't ask the form class to read your mind. Create a form that knows
>> which fields it expects so that errors can be raised correctly and
>> validation will occur normally.
>
> I am not asking the form class
Someone debugs django with eric4? How?
Thanks!
--~--~-~--~~~---~--~~
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
On Thu, Jan 1, 2009 at 11:30 PM, nbv4 wrote:
>
> I have a webapp that is accessed by the following urls (among others):
>
> example.com/foobar-page-23
> example.com/preferences
> example.com/barfoo
>
> etc.
>
> When these URL's are access, the page is displayed using data from
On Fri, Jan 2, 2009 at 7:48 AM, Praveen wrote:
>
>
>
>By product name :
>
>By date approval :
>
>
>
>
> views.py
> import Q
>
> def proreport(request):
>query = request.GET.get('q', '')
>query1 = request.GET.get('p', '')
>print
On Tue, Dec 30, 2008 at 9:11 PM, Info Cascade
wrote:
>
> Hi --
>
> I am getting intermittent errors on certain database queries on our
> production server.
> I am having a hard time duplicating them (most of the time they run
> okay, only sometimes on the production
On Tue, Nov 4, 2008 at 8:37 PM, John M <[EMAIL PROTECTED]> wrote:
>
> I'm trying to figure out how I can use more than one model with a call
> to object_list generic view.
>
http://www.djangosnippets.org/snippets/1103/
--~--~-~--~~~---~--~~
You received this
On Tue, Nov 4, 2008 at 9:58 PM, Antonio Volpon <[EMAIL PROTECTED]>wrote:
>
> Hello.
>
> I am very new to Django and I'm having some problems in overriding the
> save method for a simple class. In particular, the following code
> (models.py) used against a Mysql database doesn't change the value
On Mon, Oct 27, 2008 at 5:52 PM, redmonkey <[EMAIL PROTECTED]>wrote:
>
> h. Yeah, That's pretty simple.
>
> I could even get a reference to the Job number using -v with at,
> storing that in the DB and then removing and recreating another at-job
> if the user changes the time.
>
Do you mean
On Mon, Oct 27, 2008 at 1:07 PM, Frank Malina @ vizualbod.com <
[EMAIL PROTECTED]> wrote:
>
> Hi all,
> in my projects I use a set of settings conventions that are the same
> from project to project. I want to separate them because I don't want
> to repeat myself.
>
> I am also reusing a big deal
ute(self.end_date, 15)
super(Auction, self).save()
On Mon, Oct 27, 2008 at 1:06 PM, Matías Costa <[EMAIL PROTECTED]> wrote:
> I have the exact problem. I round end and start dates to 15 minutes. I
> mean, user enters 12:10, I write 12:15. So each 15 minutes cron runs a
> scri
I have the exact problem. I round end and start dates to 15 minutes. I mean,
user enters 12:10, I write 12:15. So each 15 minutes cron runs a script with
django-commands-extensions runscript. Is a balance between accuracy and
load.
The perfect should be finding the next success to happen (easy)
On Sat, Oct 25, 2008 at 7:26 AM, Russell Keith-Magee <[EMAIL PROTECTED]
> wrote:
>
> On Fri, Oct 24, 2008 at 10:16 PM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> >
> > OK, I have a model with a many to many relationship.. pretty
> > straightforward pre-1.0 code:
> >
> > class
Any reason? Seems pretty basic and easy to limit TextField length. On code
and db level.
On Fri, Oct 24, 2008 at 5:09 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 24, 2008 at 10:24 AM, omat <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi,
>>
>> I have a form class derived from a model using
Sure exists a better way. Get the tags (using django-tagging) used by more
than 3 items:
Tag.objects.extra(where=["id in (select tag_id from tagging_taggeditem group
by tag_id having count(tag_id)>3)"]
On Fri, Oct 24, 2008 at 4:37 PM, kbs <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> is it
30 matches
Mail list logo