for the first
request won't be returned until the session data has been written
successfully - which means there are no sync issues. Is the same true of
the memcached-based backend? i.e is the response delayed until there is
some confirmation that the cache has been written to?
Regards,
Andrew
(user_id,number):
return Order.objects.filter(user_id=user_id).limit(number)
like this:
{% latest_orders request.user.id 5 as orders %}
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
can think of is very unappealing.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
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 unsubs
regexps could be used to
do some basic branching.
Any thoughts would be appreciated.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Hm, I thought that's what I had tried, obviously I was doing something
slightly wrong. Oh well, it works now.
Thanks for your help :)
bruno desthuilliers wrote:
> As often with Python, the simplest thing to do is to fire a Python
> shell and explore the problem:
>
>
from django import
(('listing','joe'))
It returns the banner, when by my understanding it shouldn't.
It's returning the same result as:
Banner.tag_objects.with_any(('listing','joe'))
Have I completely misunderstood how this is supposed to work?
Regards,
Andrew Ingram
That works great, thanks!
bruno desthuilliers wrote:
> http://www.djangosnippets.org/snippets/1293/
> This may help:
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
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 group, send email to
d
Thanks for your response Karen,
I've tried the workaround in the ticket and I get this error:
Exception Type: AttributeError
Exception Value: 'InMemoryUploadedFile' object has no attribute
'width'
I have a vague recollection that this was actually working before I did
the
I've just tried saving the model using the approach followed in Django's
unit test and the database gets populated correctly, this reinforces the
likelihood of it being an admin-related issue.
Regards,
Andrew Ingram,
Karen Tracey wrote:
> http://code.djangoproject.com/ticket/9545
>
I reverted Django to revision 9756 (just after aggregation was merged
in) and everyone works fine, so evidently a commit made in the last
few days has caused this issue.
Regards,
Andrew Ingram
On Jan 23, 6:40 pm, Andrew Ingram <a...@andrewingram.net> wrote:
> I've just tried saving
>
> Regards,
> Malcolm
>
I've narrowed it down to revision 9766:
"Fixed #10044: You can now assign directly to file fields
(`instance.filefield = somefile`)."
http://code.djangoproject.com/ticket/10044
It's late now, but I'll update the ticket tommorrow if nobody else has
using a single INSERT with all the
objects. I'm no expert on whether this is optimal or not, I just want
to be sure that this behaviour is deliberate rather than an oversight.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you
to
connect to which would allow you to upload to all the machines at once
(but even if there's one that only allows you to upload to one machine
that would still be useful).
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you
On Jan 29, 1:19 pm, Christian Joergensen wrote:
> What if one of the machines was unresponsive at the time of the upload?
One option would be to have all the files uploaded locally, but the
handler would additionally copy to the other locations. The other
would just to be to have
it has yet to be done (nobody has agreed
on the best way to do it)
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
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@googl
hey're broken if used in the admin module after revision 9765.
That's the only issue I'm aware of with trunk.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
k and will
cause an exception.
I've rolled back to revision 9765 for the time being.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
save this to the db and store the cart id
in the session. This can create a problem with having a bunch of orphan
carts in the db after the sessions have expired though, normal solution
is to have a script that periodically cleans up any old carts. Other
solution is that you store the
have you looked on djangosnippets.org?
2009/2/9 jeffself :
>
> Is there a presentation available that I can use? Would like to skip
> the whole building of the presentation myself if possible. If there
> isn't one, I may create an "open-source" presentation myself and make
develop a cross-platform build script for the docs is one
thing but it's pretty arrogant to dismiss it outright.
The Django devs are perfectly entitled to ignore Windows as far as
docs go, but please don't make assumptions about the abilities and
needs of your
iginally.
>
> Alex
If this is the case then maybe all we need is better instructions on
building the documentation to be added to the Django site.
- Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
h user.order_account or user.newsletter_account.
Regards,
Andrew Ingram
Gok Mop wrote:
> I'm struggling with how to design something, and I'm pretty sure
> somebody has an easy solution.
>
> I need to store different information about different classes of
> users. I want to attach thos
them to return the correct URL.
Is there a straightforward way to use django's url parser to take a
URL and return the information I need? Presumably to turn them back
into a URL I just need to use the reverse functionality somehow.
Regards,
Andrew Ingram
That's a good point, I'll solve the problem by setting up redirects.
Still it's nice to know about the resolve function.
Regards,
Andrew Ingram
2009/2/27 Ned Batchelder <n...@nedbatchelder.com>:
>
> I'm curious why you think view names and arguments will remain unchanged
> in t
use a django-served template for your JS file.
2008/10/8 Johnny <[EMAIL PROTECTED]>:
> Hi everyone,
>
> I'm writting a Web App using Django and I got problems to make appear or
> deasappear some content.
>
> Here is the code I was using to write a part of the windows:
>
>
>
to the list of Ids. I know
Django templates have reorder functionality, but that just sorts by a
property, what I'm looking for is a bit more complex. Is there anything
at the Python level I should be using?
Thanks,
- Andrew Ingram
--~--~-~--~~~---~--~~
You received
Malcolm Tredinnick wrote
> Here's one way that comes to mind: When you do the selection based on
> the id's, use the in_bulk() queryset method. That returns you a
> dictionary mapping each id value to the object with that id (see below
> for how to do this without in_bulk() if that's not
solutions I can't see myself doing anything more than a
simple blog without looking into a VPS or dedicated server with root access.
Regards,
Andrew Ingram
Tim Johnson wrote:
> I'm a long-time python web programmer. My company is interested in Django.
>
> I note from the following Amazon UR
other frameworks i've tried.
- Andrew Ingram
Torsten Bronger wrote:
> Hallöchen!
>
> While ModelForm.is_valid() finds field validation errors, it cannot
> catch errors in uniqueness or referential integrity as far as I can
> see. Thus, I have to check them in my view.py code sepa
James Bennett wrote:
> On Sun, Jul 20, 2008 at 6:57 AM, Hussein B <[EMAIL PROTECTED]> wrote:
>
>> I got that illusion due the slow official releases cycle...
>>
>
> Be careful with this logic, because it is misleading. For example:
> Britain has not had a new Prime Minister since June
,
Andrew Ingram
--~--~-~--~~~---~--~~
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 group, send email to [EMAIL
In the done() method you are provided with a list of the validated
forms so you can just do:
for form in form_list:
form.save()
before returning your response
2008/9/17 Martin <[EMAIL PROTECTED]>:
>
> Greetings,
>
> i'm playing with FormWizard and i'm having some problem saving each
> step
Django doeesn't do any request logging, it should be handled by your web
server's own logging (usually apache). There's nothing special about
Django that would cause it to be treated any differently.
- Andrew
Theme Park Photo, LLC wrote:
> Is there an existing Django application that will log
with some limitations but you
keep fairly short and logical URLs.
Regards,
Andrew Ingram
2009/4/16 Marcin Mierzejewski <marcin.mierzejew...@gmail.com>:
>
> Hi Aidas,
>
>> 7. Using the controlling words before the type of list:
>> /by-popularity/products
e do this, but without the /search/ part. The site we are building
uses search as a filter, so any listing page can have ?q=foo added to
perform a search within the list. As an added bonus, by using a query
parameter it makes it possible to track search usage in Google
Analytics without hacking
the orders for individual orders rather than for everyone,
but an efficient solution is still preferred.
Any ideas would be appreciated
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
This is the only real way to do this with Django, though I do wish
there was a core Django way to validate GET params, ie which ones are
allowed and what format they should be.
- Andrew Ingram
2009/5/19 Will Matos <w...@tcdi.com>:
>
> You wouldn't match this using a url patter
I've used the forms framework with GET (I'm using it for a search form
and a 'q' parameter), but it never occurred to me to use it to
validate non-form parameters.
Thanks!
- Andrew Ingram
2009/5/19 Russell Keith-Magee <freakboy3...@gmail.com>:
>
> On Tue, May 19, 2009 at 10:3
locally which obviously
doesn't exist. All I want from the imagefield is the filename/path,
everything else I need from the image file itself is already stored in
the database.
Is there a way I can disable the file-loading part of the imagefield?
Regards,
Andrew Ingram
That seems to have fixed the problem, thanks!
- Andrew
On 28 May, 13:45, Michael <newmani...@gmail.com> wrote:
> On Thu, May 28, 2009 at 8:21 AM, Andrew Ingram <a...@andrewingram.net>wrote:
>
>
>
> > Hi all,
>
> > Some of our models make use of Image
, the relationship works fine (it's
not a site-level caching thing because the issue affects my dev
environment pointing at the live database)
Any thoughts would be greatly appreciated
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you
I've now resolved this issue, it was caused by a combination of a
database config error and using the wrong model manager
Regards,
Andrew Ingram
On 12 June, 12:09, Andrew Ingram <a...@andrewingram.net> wrote:
> I'm having a problem with a manytomany relationship in Django..
>
608).
I hope this helps.
- Andrew Ingram
2009/10/13 nabucosound <hecto...@gmail.com>:
>
> This is the default behaviour in Django Admin, dude...
>
> On Oct 13, 9:43 am, andreas schmid <a.schmi...@gmail.com> wrote:
>> hi,
>>
>> how can i achieve a behav
become available if you use render_to_response
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
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 un
It looks like you need to add the form to your view contexts.
return render_to_response ("UPSRateLookUp/upsratelookup.html",{
"form": form
"results": results,
"query": query
})
else:
form = form_upslookup()
return render_to_response
Chances are that one of the views isn't passing the media template
context processor to the template.
= Andrew
Bobby Roberts wrote:
> i've got two templates in the same directory. My css works fine on
> one template but not the other. My link to the css is
>
>
>
> Can you think of any
On Thu, Jun 5, 2008 at 4:20 PM, Andrew Ingram <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
> Chances are that one of the views isn't passing the media template
> context processor to the template.
>
> = Andrew
>
> Bobby Roberts wr
I believe the general best practice is that sessions should be viewed as
a last resort for storing data.
You can store data in a number of places and they each have their
benefits and drawbacks.
The easiest place to store data is the URL, but storing user-specific
information in the URL is a
bruno desthuilliers wrote:
> Anyway, why would you want such a thing ?
I can think of one possible use, when you want some project settings to
be configurable at run-time through the admin interface.
At the moment I would probably relate a settings model to the site
model, but I think the site
50 matches
Mail list logo