Also consider a hosting mechanism not yet mentioned in the docs, mod_wsgi.
Alex
On 3/6/09, Graham Dumpleton wrote:
>
>
>
> On Mar 6, 10:45 pm, Paulo wrote:
>> Well, this leads me to an unknown path. Where i can find more
>> information about how to install it and
This only works on the latest development version of Django, not 1.0.
--
"I disapprove of what you say, but I will defend to the death your
right to say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You received this messag
gt; process?
>
> Cheers
> Ben
> >
>
As best I recall you can't do a multipart form submission over Ajax, so you
need something like an iFrame I think.
Alex
--
"I disapprove of what you say, but I will defend to the death y
y logged in (that is without writing my
> own view to handle the auth,login stuff ?
> >
>
Write your own view, but basically have it do:
def my_view(request):
if request.user.is_authenticated():
do_my_stuff()
else:
return login(request)
Alex
--
"I disa
ren
>
> >
>
Karen is correct, if you are working with 1.0 itself I always reccomend you
use Jannis Leidel's mirror of the 1.0 docs: http://docs.jezdez.com/
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The pe
late tag that was passed the variable and
rendered that if there was data, else created and rendered a blank form.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--
te tag?
>
> Making sure I got it, that does sound better.
>
> Thanks.
>
>
>
> On Mar 7, 4:25 pm, Alex Gaynor wrote:
> > On Sat, Mar 7, 2009 at 4:03 PM, luell.m...@gmail.com
> > wrote:
> >
> >
> >
> >
> >
> >
> >
>
You need to write some javascript to do this, using ajax probably. The
technique for solving this on the client is orthagonal to django.
Alex
On 3/8/09, ldm999 wrote:
>
> I'd like to have a Django form with 2 fields: List Type droplist (eg
> Books, Movies) and List Name
I do as you stated
> above, I get the error:
> ImproperlyConfigured: ImportError ea_app: No module named ea_app
>
> Thanks for spending your time helping a newbie...
> Dan
>
> >
>
Is the folder that contains the folder ea_app on your PYTHONPATH?
Just right a
script to do this(possibly as a management command) and schedule it to run
every X minutes.
ALex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~-
cern would
be I don't think it's a particularly good thing to mix concerns about design
vs. development, they really draw on entirely seperate skills even if the
tools are a little similar.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it."
something built-in
> to django now?
>
> Thanks,
> Matt
> >
>
Django can't handle a multiple column primary key(see ticket #373) however
it can handle a multiple column unique index:
http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together.
Alex
--
"I disa
zip_file(filename, location, flatten=not filename.endswith
> ('.pybundle'))
> File "c:\python25\lib\site-packages\pip-0.3.1-py2.5.egg\pip.py",
> line 1954, in unzip_file
>fp = open(fn, 'wb')
> IOError: [Errno 2] No such file or directory: 'c:\\use
ee if these bounds fall within another
> one). This has advantages that you can sort them, perform better
> checks on them, querying against them is easier, you can
> aggregate them to find the count, and you're not limited to an
> arbitrary number like 30. Granted, many of these
validation you'll have to write
some for whatever the data entry mechanism is, usually forms, either for
your views or the admin.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law.&qu
gt; >
> > Thanks for your time.
> >
>
Django makes a lot of the SEO best practices, such as sitemaps, very easy,
in addition in empahsis clean urls, and a single resource per URL(by keeping
the usage of the trailing / consistant), other than that there's not much it
can do. The
I need to retrieve 'name' field of 'BankerCategory' with 'Homeloan'
> > > object
> > >home=Homeloan.objects.all()
> > > from this 'home' object how can i access value of 'name' field of
> > >
t; I mean if I already have {"node_a": 1, "node_b": 2}, I can't add
> {"node_a": 2, "node_b": 1}
> How to enforce this restriction efficiently?
>
> >
>
Are you looking to maintain cross field uniqueness, if so:
http://docs.djangoproject.com/
odel and postgres sql
> server stuctures.
>
> Any clues why my development server fetches and filters will not
> return coherent
> data?
>
>
>
>
> >
>
What you've pasted so far doesn't say anything about the data itself, all it
indicates is your __unicode_
d
> Edge(node_a=y, node_b=x).save()
> because edge is a set of two distinct nodes.
>
> On Mar 9, 8:54 pm, Alex Gaynor wrote:
> > On Mon, Mar 9, 2009 at 8:52 AM, uprising wrote:
> >
> > > Just reminded of a problem by this post, how can I validate a uniq
r of people trying to make
> > automatic model-related forms do all sorts of funky things, because I
> > hardly ever use them. So many of my use-cases don't have forms mapping
> > directly to models, so I write a normal Form class and then my view
> > knows how to t
in my ModelForm fields?
>
>
>
>
>
> On Mar 9, 10:51 am, mike171562 wrote:
> > Thanks alex, that worked, I have the extra field, and now to figure
> > out how to to tie it in to the main form and my user model.
> >
> > On Mar 9, 10:12 am, Alex Gaynor wrote
correct in the function. Any suggestions?
>
>
>
> >
>
You've omitted quite a bit of code from here which unfortunately makes this
quite difficult to follow, because based on what you've shown us you should
be getting quite a few NameErrors.
Alex
--
"I disappr
.ocultarEstado',
> )
> # --
> my question here: how can i import all functions inside 'globalValues'
> file with one call?? -i'm looking for a "myproject.globalValues.*"
> kind of expression"- making every function calling with an entry is
> qui
project.com/en/dev/topics/auth/#authentication-in-web-requests
>
> -Rajesh D
>
> >
>
The important thing to remember is that you never have access to some global
user object, you need to pass it to wherever needs it.
Alex
--
"I disapprove of what you say, b
e this helps someone else.
> >
>
Yes, all items that come in over HTTP come in as strings, you need to
process them yourself(or handle it using django.forms).
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
&qu
leads me to
> wonder if Django is:
> a) automagically appending my project directory to the pythonpath when
> I run the ./manage.py shell
> b) somehow stomping on my pythonpath configurations when I run the
> devserver
>
> Anyone have any advice?
> >
>
Yes, manage.py
ion, everything looks in order.
> I'm using Django trunk, Python 2.6.1 and cx_Oracle-5.0.1
>
> TIA,
> Brandon
> >
>
Nope, it should just work. What happens when you try to do the query, do
you get an exception?
ALex
--
"I disapprove of what you say, but I will def
On Mon, Mar 9, 2009 at 3:06 PM, Brandon Taylor wrote:
>
> Hi Alex, thanks for the response.
>
> I see that Django is trying to select a property that doesn't exist
> from this view...
>
> SELECT "LU_CSU_CODE"."ID", "LU_CSU_CODE"."DEP
', ) might map to my static/ or templates/ directories, for
> instance.
>
> The third path ( '/home/user/web/project/../project', ) remains a
> mystery...
> >
>
That path just amounts to /home/user/web/project since .. just goes up a
level.
Alex
--
"I di
greatly appreciated...
>
> Thanks
>
> >
>
I would change the schema to use an explict ManyToManyField(whcih is what
you created yourself), and then it's just a MultipleModelChoiceFIeld with a
CheckboxSelectMultiple widget.
Alex
--
"I disapprove of what you say, but I will defend to t
t;
> Do I even need to restart the apache instances if my memcached
> settings change?
>
> Thanks!
> >
>
If you're deployed under mod_wsgi I believe touching the WSGI file will
cause it to reload the files.
Alex
--
"I disapprove of what you say, but I will defend to the
uot;stylesheet"
>
> The correct link:
> type="text/css" />
>
> I must have looked at that link dozens of times until I noticed it.
> Apologies for cluttering the list with my brainlapse.
>
> >
>
FWIW I believe the appropriate ackrnym is PEBCA
looks OK when the database server and web server in the same
> > > machine, but really slow when the web server to call a remote database
> > > server because the plans is more than 2000, so it generate more than
> > > 2000 database queries calls.
> >
> > I d
er write some code to do stuff like
that, or I have a project called django-filter that tries to allow you to
create similar interfaces for public views:
http://github.com/alex/django-filter/tree/master
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
s
On Mon, Mar 9, 2009 at 9:52 PM, Wiiboy wrote:
>
> But Django doesn't offer it bult-in?
> >
>
Django doesn't have anything included to automatically create all that, but
you can quite easily build it yourself.
Alex
--
"I disapprove of what you say, but I will def
ter:forloop.counter }} #This
> code is not working
> { %endfor %}
>
> Regards
> Rama vadakattu
>
>
>
>
>
>
>
>
>
>
> >
>
is there a reason you can't just do {{ k }} why would an item be at a
different position then it's i
m too dumb to understand
how they work.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You received this message
What task_id do you send when editing the entry?
On Tue, Mar 10, 2009 at 3:54 PM, Dmitry Teslenko wrote:
>
> Hello!
>
> I'm starting with django framework; I use django 1.0 and sqlite
> database backend.
> I've stumbled upon this thing: when editing model entry with ModelForm
> I get insert inste
On Tue, Mar 10, 2009 at 9:22 AM, jago wrote:
>
> Can I somehow apply an filter to an included template?
>
> {% include "header_viz_js.html" %}
>
> how?
> >
>
This is untested but the filter tag would probably work
{% filter myfilter %}
{% include "template.jhtml" %}
{% endfilter %}
--
"I disap
On Tue, Mar 10, 2009 at 9:06 AM, jago wrote:
>
> Ok...the text in the docu also describes it for 0.96. Thanks!
> >
>
Django .96 doesn't have HTML autoescaping.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Volt
d
>> django-treebeard (both of them are on Google code and are the first hits
>> if you search for their respective names).
>>
>> The django-mptt project contains some template tags to help display the
>> data in templates. django-treebeard does not, from memory, although
>&g
Works]
>
> How can I simply display the values of the fields and not make them
> editable?
>
>
> >
>
Django doesn't have a built in way to do a non-editable fields, I did a blog
post on one way a little while ago:
http://lazypython.blogspot.com/2008/12/building-read-only-f
s possible with aggregation support in the Django development
version/1.1 alpha and it looks like:
Thing.objects.annotate(num_other=Count('other_thing')).order_by('num_other')
Alex
--
"I disapprove of what you say, b
you
need to put it in a string and use a template object as the djangobook
shows(and all the docs do), not try to execute it at the Python prompt.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the
t;
> J
> >
>
No, to my knowledge there is a historical reason for this as the auth code
originally came from LJW and the registration stuff was very intertwined
with their custom stuff so it didn't get extracted. However
django-registration by James Bennet contains a very common
i-19th-century-jpg',
> u'c4a6afe0a71e3632',
> 3,
> u'[]',
> 5,
> False,
> False,
> False,
> True,
> True,
> 1,
> u'',
> 1,
> None,
> False,
> 1,
> "'19th':4,9 'hokusai':3,8 'ts
ing is, I haven't been able to find any documentation on using the
> class name as a variable in this situation...
>
> Any thoughts?
> >
>
Can you paste some of your code? It's my guess that the issue is that you
need to reapply the permalink decorator on the inherited m
> the required variables, and then dispatches to URLS.py?
>
> Cheers,
> -Josh
> >
>
You're probably looking for a template context processor, consult the docs
for info on them.
Alex
--
"I disapprove of what you say, but I will d
across forms in an inline, or across a single form does.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You received
of concept?
>
> Thanks
> >
>
What I would do is overide save() and add an extra parameter
"dont_calculate" or something that is False by default but that you can pass
in when you don't want the calculations to occur.
Alex
--
"I disapprove of what you say,
e code snippet:
>
> It's a reasonable guess, based on you not ruling it out, that you're
> experiencing this:
>
>
> http://docs.djangoproject.com/en/dev/faq/models/#why-is-django-leaking-memory
>
> Regards,
> Malcolm
>
>
>
> >
>
Try this method:
I'm trying to populate an admin form with the field names of of a model
class, but I don't want to have to instantiate that model just to read it's
fields from _meta.
I basically want to do something like this:
self.fields['sort_by'].choices = [(field.verbose_name, field.name) for field
in field_
>out_cols = self.get_columns(with_col_aliases)
> File "C:\Python24\Lib\site-packages\django\db\models\sql\query.py",
> line 588, in get_columns
>col_aliases)
> File "C:\Python24\Lib\site-packages\django\db\models\sql\query.py",
> line 633, in get
On Wed, Mar 11, 2009 at 10:33 AM, Alex Jillard wrote:
> I'm trying to populate an admin form with the field names of of a model
> class, but I don't want to have to instantiate that model just to read it's
> fields from _meta.
>
> I basically want to do someth
Sorry Alex, I should have been more clear, I need to access the fields of
another model. I went ahead and did what you said to try and get it
working, and I was able to get the fields from the form's model, but I get
an error when trying to assign them to the choices property of my field.
On Wed, Mar 11, 2009 at 11:18 AM, Alex Jillard wrote:
> Sorry Alex, I should have been more clear, I need to access the fields of
> another model. I went ahead and did what you said to try and get it
> working, and I was able to get the fields from the form's model, but I get
&
one)
.AttributeError: 'RFSInputForm' object has no attribute 'get'
I'm hoping someone could enlighten me as to what the problem might
be. I've distilled my experiment to the simplest possible instance,
but the suggestion found at
http://www.b-list.org/weblog/2008/nov/09/dy
If I override get_form in ShelfAdmin, I still get the same errors.
self.fields is still None...any idea how to get access to the fields?
On Wed, Mar 11, 2009 at 12:26 PM, Alex Gaynor wrote:
>
>
> On Wed, Mar 11, 2009 at 11:18 AM, Alex Jillard wrote:
>
>> Sorry Alex, I sho
On Wed, Mar 11, 2009 at 11:50 AM, Alex Jillard wrote:
> If I override get_form in ShelfAdmin, I still get the same errors.
> self.fields is still None...any idea how to get access to the fields?
>
> On Wed, Mar 11, 2009 at 12:26 PM, Alex Gaynor wrote:
>
>>
>>
>>
Ah, that makes sense, thanks. With that change, I can use _meta.fields from
my other model and everything works great.
Thanks for the help
On Wed, Mar 11, 2009 at 12:53 PM, Alex Gaynor wrote:
>
>
> On Wed, Mar 11, 2009 at 11:50 AM, Alex Jillard wrote:
>
>> If I ov
info on them). The great thing about this is ebcause of the way
querysets work you won't even have the overhead of an extra SQL query unless
you use it since the queryset won't evaluate unless it's used :)
Alex
--
"I disapprove of what you say, but I will defend to the
a custom form:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#form
and to set the fields automatically you should use the save_model hook:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#save-model-self-request-obj-form-change
Alex
--
"I disapprove of what you say, but I wil
#x27;ve
> imported the models so country should be there. I know there is
> something simple I'm missing just can't figure out what.
> >
>
What is county supposed to be here, perhaps you should paste the null view.
Alex
--
"I disapprove of what you say, but I will de
or.objects.filter(county=c)
>return render_to_response('county/county_detail.html',{'county':c,
> 'Vendors': Vendors})
>
> On Mar 11, 11:28 pm, Alex Gaynor wrote:
> > On Wed, Mar 11, 2009 at 10:26 PM, nixon66 wrote:
> >
> > > Tryin
ng them in the choices list.
>
> Regards,
> Malcolm
>
>
>
> >
>
Alternatively you could use a TypedChoiceField(which may not be
documented). It looks like you're working with models here so it may be
easier for you
a number of years ago that instead of sending
the plain text traceback it sent an HTML email with the DJango DEBUG page.
Perhaps someone remembers what I'm talking about.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The
ave_existing_objects() and use that for the formset=
> argument of inlineformset_factory()?
> >
>
The method you propose of overiding save_existing_objects is how I'd do it.
Alex
--
"I disapprove of what you say, but I will defend to the death your rig
res and best practices. Any suggestion
> would be really helpful.
>
> Thanks
> Rav!
>
> >
>
I wrote something similar to this a while ago, here:
http://github.com/alex/django-plugins/tree/master and while I haven't really
maintained the code, nor does it work with the late
there is nothing left
> to add, but when there is nothing left to take away"
> - Antoine de Saint Exupery
>
> >
>
Documentation patches are handled the same way as code patches, file a
ticket, upload a .diff, and someone will review it, and eventually a
committer will commit
/sigh
I knew it was going to be something like this. I'm sorry to have
troubled you :-/.
Thank you, JKM.
On Mar 12, 9:31 pm, Jacob Kaplan-Moss
wrote:
> On Wed, Mar 11, 2009 at 11:30 AM,Alex G wrote:
>
> > Having referencedhttp://www.b-list.org/weblog/2008/nov/09/dynamic-
gt; return render_to_response("contact_success.html")
>
>
> Now when i hit the send button, i get a django error page stating that
> my view isn't being passed any key values. When i look down the error
> page i see that there is no post data. I'm a little uns
which automatically turns a tuple into
arguments, for some reason I thought you had a dict there.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~-
redefined way to control the
> precision in the rendering of template instead of having to re-format
> the output of the float in my code.
>
> thanks.
> >
>
Take a look at the floatformat filter:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#floatfo
html = u''' > value="captcha.%(hiddentext)s"
> > /> > />''' %
> > {'name':name,
> > 'hiddentext': self.hiddentext,
> > 'imageurl': self.imageurl }
> >
> > +retu
the path, but how?
> Any hint will be appreciated.
>
> Thanks,
> Christoph
> >
>
You can do this by providing a callable to upload_to:
http://docs.djangoproject.com/en/dev/ref/models/fields/#filefield . Using
the instance, so this might look like::
def upload_location(instance,
?
>
> Thanks.
> >
>
You can instantiate a form with request.GET just the same as you can with
request.POST. MyForm(request.GET) works just fine.
Alex
--
"I disapprove of what you say, but I will defend to the death your right
is ext3, no funny business (that I know
> about) with ACLs or anything. Just a bog-standard CentOS 5.2.
>
> Linux myhostname 2.6.18-92.el5PAE #1 SMP Tue Jun 10 19:22:41 EDT 2008
> i686 i686 i386 GNU/Linux
>
>
> >
>
This isn't stricly related, probably, but you generally sho
3:26 pm, TP wrote:
> >
> > > I have just started to use Django on a Linux machine and when trying
> > > to create a new problem I get the following error:
> >
> > > django-admin.py: command not found
> >
> > > Any suggestions ?
> >
>
s with this approach?
>>
>>
>
> >
>
Most people structure their URLs that way since Django makes it nice to have
these pretty urls. That being said I'd probably write out the full
user/group just because it makes the urls a little more se
t;
> Regards
> Koran
>
>
>
> >
>
Right now that isn't possible, is there any reason you couldn't just bring
the seperate SUMs into python and do the subtraction there, I realize it
isn't quite as clean but the overhead should be minimal?
Alex
--
"I disapprov
if so it looks like:
if instance.sites.filter(id=1):
do stuff
which is hopefully clear in what it does, if you're trying to do something
else you'll have to clarify.
Alex
--
"I disapprove of what you say, but I will defend to the death
On Mon, Mar 16, 2009 at 11:52 AM, koranthala wrote:
>
>
>
> On Mar 16, 8:14 pm, Alex Gaynor wrote:
> > On Mon, Mar 16, 2009 at 11:07 AM, koranthala
> wrote:
> >
> > > Hi,
> > >I downloaded Django 1.1 due to aggregation support.
> > &g
/easy-multi-database-support-django/except
for if you're using django trunk you can use django.db.load_backend
and the new DatabaseWrapper constructor(which takes a dict of settings) to
do it, instead of futzing with the global settings.
Alex
--
"I disapprove of what you say, but I
l and doesn't seem like behavior you'd ever want to chnage:
http://code.djangoproject.com/browser/django/trunk/django/db/models/base.py#L352
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the
e we close bugs for the final release. If you
> > > don't get an immediate response, be patient and wait until a bit after
> > > the release when we all have a bit more time.
> >
> > > Jacob
> >
>
One possibility would be to use 2 cookies, one the norm
/sky
>
> >
>
Yep, checkout the "inspectdb" management command:
http://docs.djangoproject.com/en/dev/ref/django-admin/?from=olddocs#inspectdb
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it.&qu
e.datetime.now().hour)
I guess technically you could just have 14 fields on the mode(open and close
for each day of the week), which is fine since days of the week are a static
number of things but that felt bulky to me(though it's probably more
preformant).
Alex
--
"I disapprove of what
ath)
2. There is a syntax error in your settings file. To check for this
you could just run "python /path/to/your/settings.py" from the shell.
See if that exits with errors.
Happy Djangoing!
Alex
On Mar 16, 8:47 am, Joshua Partogi wrote:
> Dear all,
>
> I have a custom setting
me sort of built in 'blacklist'?
>
> Regards,
> Andrew
>
> >
>
One way is to actively validate these, another is to just list that URL
pattern after your other ones, so that if someone goes to /admin/ it goes to
your admin, no they're profile.
Alex
--
"I
gnKey('Book')
Then you could get that data like this:
title = "The book's title"
book = Book.objects.get(title=title)
phrase = Phrase.objects.get(book=book)
Now you have all the objects you need, just access their data like
normal python objects.
book.title
phrase.text
H
; File "/home/cserv2_a/ug/scs5tdp/Desktop/mysite/mysite/settings.py",
> line 79
>'mysite.polls'python
>
>
>
> Does this mean there is something wrong where I have added 'import
> datetime' to my code?
> >
>
Part of your traceback got cut
On Tue, Mar 17, 2009 at 8:35 AM, Andrew Turner wrote:
>
> 2009/3/17 Alex Gaynor :
> > One way is to actively validate these, another is to just list that URL
> > pattern after your other ones, so that if someone goes to /admin/ it goes
> to
> > your admin, no th
On Tue, Mar 17, 2009 at 10:56 AM, luxagraf wrote:
>
> Alex-
>
> Thanks for the suggestions... the 14 fields is definitely an option,
> but like you said it feels awkward and would make it hard to adapt
> should things change down the road.
>
> Darryl -
>
> >
> Any help will be appreciated.
>
>
> Regards, Stefan
>
>
> >
>
You should be calling `is_valid` as it's a function, not a property:
attachmentset.is_valid()
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --V
You can use `forloop.counter` with `sum` filter. Or use `ol` html tag
with proper `start` attribute.
On Tue, Mar 17, 2009 at 7:47 PM, Jesse wrote:
>
> Hello,
>
> I've finally gotten pagination to work. Now I would like to add a
> sequential number to the beginning of each record in the output.
cord_list %}
>{{ forloop.counter }}: {{ record }}
> {% endfor %}
>
> Jacob
>
> >
>
Jacob, if I understand the issue is that on the 2nd page he wants to start
the count at 101, not 1.
Alex
--
"I disapprove of what you say, but I will defend
. If you haven't already I would take a look at the
official django docs/tutorial, they really are quite good :).
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cic
e's no way to do pure python filtering using the filter() method.
If you want you can do it using the Python filter function: qs =
filter(lambda obj: obj.method() > 0, qs). But remember that will need to
pull in all possible records from the DB to do that filtering.
Alex
--
"I disap
to anyone who can help!
>
> -- Andrew
> >
>
The code to calculate the cache is here:
http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py#L171it's
a lot to follow but it gets used in
ReverseSingleRelatedObjectDescriptor which calls self.field.get_ca
501 - 600 of 1902 matches
Mail list logo