Hi -
I have these models; with one custom manager.
class OrderByHighestScoreManager(models.Manager):
def get_query_set(self, *args, **kwargs):
qs = super(OrderByHighestValidationsManager,
self).get_query_set(*args, **kwargs)
return
qs.annotate(score=Count('votes__id'),).order_
On Dec 20, 2:23 pm, Daniel Roseman wrote:
> On Monday, December 20, 2010 11:03:10 AM UTC, LaundroMat wrote:
>
> > Hi -
>
> > Django seems to be caching data that I query through a custom method on a
> > model. I've tried to describe the issue over at SO (
>
On Dec 20, 2:23 pm, Daniel Roseman wrote:
> On Monday, December 20, 2010 11:03:10 AM UTC, LaundroMat wrote:
>
> > Hi -
>
> > Django seems to be caching data that I query through a custom method on a
> > model. I've tried to describe the issue over at SO (
>
On Aug 31, 1:55 pm, LaundroMat wrote:
> I seem to remember being able to have template tags and filters
> localized in Django, but I can't find any information on this back.
> Did I misremember, or have my search skill deteriorated?
>
> I'm particularly looking for a
I seem to remember being able to have template tags and filters
localized in Django, but I can't find any information on this back.
Did I misremember, or have my search skill deteriorated?
I'm particularly looking for a Dutch localization of the timesince
template tag..
Many thanks in advance,
On Jun 4, 11:15 am, Tom Evans wrote:
> On Wed, 2009-06-03 at 14:28 -0700, LaundroMat wrote:
> > Hi -
>
> > I'm trying to change the way a ChoiceField (with widget =
> > forms.RadioSelect) is being rendered in a template. Currently,
> > rendering the form as
Hi -
I'm trying to change the way a ChoiceField (with widget =
forms.RadioSelect) is being rendered in a template. Currently,
rendering the form as_p() for instance, will return HTML such as:
choice 1
...
Is there a way to control how this ChoiceField is rendered? I'd like
to use something els
On Feb 24, 3:25 pm, Alfonso wrote:
> I've been putting together a Product Database and Customer Order
> application that requires a lot of interim calculations, things like
> tax, customer discounts etc. Due to my limited knowledge of django/
> python I have been basically performing these calcu
Hi -
I'm working on a small django app that allows users to interact with
other websites where they have an account. Ofcourse, using this app
means providing your username and password for the other website.
What are the most secure ways of handling this information? I suppose
encrypting the pas
On Feb 12, 8:33 pm, Karen Tracey wrote:
> On Thu, Feb 12, 2009 at 12:18 PM, LaundroMat wrote:
>
> > Hi -
>
> > I'm scraping some information from a website, but I'm having some
> > trouble with special characters such as é. I'm using BeautifulSoup for
&
Hi -
I'm scraping some information from a website, but I'm having some
trouble with special characters such as é. I'm using BeautifulSoup for
the scraping, and would like to be able to have Django print out muy
strings correctly (on the template, in the shell, in the admin).
The way I go about i
Hi -
I've just started fiddling about with the prototype library in order
to build in some AJAX functionality into my django site (which hasn't
gone live yet).
On one part of the page I'm using the Ajax.PeriodicalUpdater function
which asynchronously polls a URL and then integrates the html resp
On Sep 10, 1:50 pm, bharathi <[EMAIL PROTECTED]> wrote:
> Hi LaundroMat,
>
> I tried request.POST['task'] .. But that also not working..
> It shows
> " MultiValueDictKeyError at /addtask/
> "Key 'task' not found in <QueryD
On Sep 10, 12:25 pm, bharathi <[EMAIL PROTECTED]> wrote:
> Hi,
> I am using Django1.0
> In this request.POST.get() is not Working..It Gives empty value
> (snip)
What about request.POST['task']?
--~--~-~--~~~---~--~~
You received this message because you are su
On 6 mei, 06:32, Norman <[EMAIL PROTECTED]> wrote:
> and what editor do you use?
> some advice?
Geany (PC & Linux, Mac probably too) is the one I use.
As for books, Core Python Programming is invaluable (to me at least) -
see
http://www.amazon.com/Core-Python-Programming-2nd/dp/0132269937/ref=pd
On 5 mei, 14:39, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Mon, May 5, 2008 at 7:08 AM, LaundroMat <[EMAIL PROTECTED]> wrote:
> > On 1 mei, 13:43, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> > > On Thu, May 1, 2008 at 7:2
On 5 mei, 05:26, Gboro54 <[EMAIL PROTECTED]> wrote:
> Hi everyone...I want to use frames in a web app i am building..I have
> a display.html that has the frames sets and takes 2 other html
> files...the one problem is the other 2 pages have variables binded to
> them...I am not sure how to get th
On 1 mei, 13:43, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Thu, May 1, 2008 at 7:22 AM, LaundroMat <[EMAIL PROTECTED]> wrote:
>
> > Hi -
>
> > Would it be possible to subclass a form class, and in that subclass
> > define that one of
Hi -
Would it be possible to subclass a form class, and in that subclass
define that one of the fields that were required in the parent class
are no longer required in the subclass?
Thanks,
Mathieu
--~--~-~--~~~---~--~~
You received this message because you are s
Hi,
When creating a new user, is_active is automatically set to True. The
django docs say this means "Designates whether this account can be
used to log in. Set this flag to False instead of deleting accounts."
On the admin pages of a django website however, next to the "Active"
flag, the descri
I have had good experiences (albeit limited; the hosted site is more a
testing thing than something else at the moment) with a small orange
as well: asmallorange.com
On Nov 21, 2:40 pm, "Ronaldo Z. Afonso" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> Can anybody recommend me a Django Web Hosting Se
request["filter"] is a session variable, that's why it works :)
On Aug 10, 5:25 am, "Kai Kuehne" <[EMAIL PROTECTED]> wrote:
> On 8/10/07, james_027 <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > hi,
>
> > > def list_filter(request):
> > > """Update session filter"""
> > > # request['filter'] is
Are you sure you want to avoid that? I remember somebody here linking
to an article where this wasn't advised, because it's (apparently)
quite common for members of the same household to register with the
same e-mail address (but with another username ofcourse).
On Aug 6, 12:02 pm, Aljosa Mohorov
Of the top of my head, but would the following be helpful?
user, new = User.objects.get_or_create(username = user, email =
email)
The function returns either:
- a new user object and True if the user didn't exist yet (and had to
be created);
- an object with existing user data and False.
Mind th
your (what I assume is a)
> ManyToManyField/ForeignKey.
>
> On Aug 2, 5:37 pm, LaundroMat <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Suppose I have defined the models from the django documentation
> > (http://www.djangoproject.com/documentation/db-api/).
>
Hi,
Suppose I have defined the models from the django documentation
(http://www.djangoproject.com/documentation/db-api/).
I'm performing a search the entries model, and I want to look through
all of its fields:
from django.db.models import Q
query =
'querystring'
On 20 jul, 10:53, james_027 <[EMAIL PROTECTED]> wrote:
> hi,
>
> is there a short cut for assigning input data to model's data
> attribute?
>
> if Book is a model then
>
> b = Book(request.POST)
> b.save()
>
> the assignment will be done on all the match key of the request.POST
> QueryDict and
On Jul 18, 9:08 am, Jonathan Buchanan <[EMAIL PROTECTED]>
wrote:
> LaundroMat wrote:
> > Hi,
>
> > When running this, I get a "NoneType has no attribute
> > is_authenticated()" error, and I cannot understand why:
>
> > 1 new_user = User.objects
Hi,
When running this, I get a "NoneType has no attribute
is_authenticated()" error, and I cannot understand why:
1 new_user = User.objects.create_user(username, "your.email",
password)
2 new_user.is_active = False
3 new_user.save()
4 user = authenticate(username = new_user.username, password =
On 12 Jul, 10:21, james_027 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am following the official tutorial of django, and found out that
> several model are define in a single file. I just wonder if we could
> have one model per file? or can be as flexible as X no of models in
> file A and Y no of mo
30 matches
Mail list logo