Hi jm,
I've been trying to reproduce your problem with no success. Can you
please post your nginx configuration (a safe version, obviously)?
Also, if you stop by #django, my username is axiak. It might be easier
to track this down in IRC.
Cheers,
Mike
On Jul 2, 6:26 pm, umrzyk <[EMAIL
I usually do it via JavaScript [1]. However, this only works in an
environment when you trust the person editing the content (i.e. the
Admin).
-Mike
1: http://mike.axiak.net/media/js/admin_overrides.js
--~--~-~--~~~---~--~~
You received this message because you
I'm am one of the authors of the 2070 patch [1]. Indeed, it is what
will help you here.
However, I'm not sure how it will work with your code as I don't
really see the context and I'm not omniscient. However, here's how
you'd write to files in #2070::
from django.core.files.filemove import
I've posted a message [1] on google's App Engine group asking for some
insight into the DataStore <--> Django Models mapping problem.
Hopefully it won't get lost amid the influx of emails on that list.
Cheers,
Mike
1:
I wouldn't use it.
For the admin, I find myself using javascript just fine to do what I
want. I usually have a middleware that sets the current user id as a
cookie, then run something like the following javascript in the admin
on window load: (requires jquery with cookie plugin)
/*
On Apr 3, 3:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> If you are counting hits as every time it is accesed from the db, I
> would overide the __init__ method.
I'd rather be explicit. Writing {{ obj.get_hits }} is really not that
taxing.
You can also modify the get_hits() method
Hey Evan,
If you're looking for performance, you might want to try using
memcached's 'inc' command. You might have to get the backend directly
from django's cache api and hence break abstraction, but it might be
worth it.
If the exact number of hits aren't that important to you, maybe you
can
;
> Thanks, Brandon
>
> On Mar 27, 5:45 pm, Mike Axiak <[EMAIL PROTECTED]> wrote:
>
> > Brandon,
>
> > It appears that the Cache Middleware does not read the content from
> > the file before caching the response [1]. I'm not sure if this is a
> > bug
Brandon,
It appears that the Cache Middleware does not read the content from
the file before caching the response [1]. I'm not sure if this is a
bug or not...though I'd probably lean towards it being a bug. (Do we
not cache middleware to *always* evaluate a file object before caching
the
AIL PROTECTED]> wrote:
> On Sun, May 27, 2007 at 12:36:04AM -0000, Mike Axiak wrote:
> > Ubuntu Feisty Fawn now has Python 2.5 [1] (thanks, Matthias Klose!).
> > For any apt-compatible system, the following should/might work:
>
> Funny enough, you should note that Feisty _sh
Hello,
This seems to warrant an announcement (just given the volume of IRC
problems in the recent past)...
Ubuntu Feisty Fawn now has Python 2.5 [1] (thanks, Matthias Klose!).
For any apt-compatible system, the following should/might work:
Add to your apt/sources.list (if it's not in there
You need a little more power than what you're doing. My initial
reaction would be to use operator and Q objects:
from django.db.models import Q
import operator
Q_user_search = reduce(operator.or_, [Q(first = first, last=last)
for (first, last) in authorList])
transform for efficiency, just put it
in a list:
query_list = [(x.calculated_field, x) for x in queryset]
query_list.sort()
query_list = [x[1] for x in query_list]
All of these solutions, however, do not scale as well as they would if
you could express them in SQL.
Cheers,
Mike Axiak
If you have checkbox fields you also need to run ``prepare``::
...
manipulator.prepare(new_data)
manipulator.do_html2python(new_data)
...
I hope this helps,
-Mike
On May 23, 12:11 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Can you post your manipulator code?
>
> On May
Hi,
I copied the code exactly as you have it and tested, and -- as I
expected -- it worked fine. Are you sure you set the first_name and
last_name fields correctly?
Perhaps you're looking at the wrong object?
Cheers,
Michael Axiak
On May 4, 7:19 am, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote:
esponse(data)
conn.close()
raise Http404
This is a very rough sketch of the shadiness you can do.
Cheers,
Mike Axiak
1: http://docs.python.org/lib/module-httplib.html
On May 3, 4:24 pm, "Bob T." <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a situation where I would l
/magical, you
can write careful __getattribute__ and __setattribute__ to emulate
fields.
Cheers,
Mike Axiak
On May 3, 12:50 pm, Gulopine <[EMAIL PROTECTED]> wrote:
> I know of one way of going about this, but it relies on a Django patch
> (#4144) that hasn't been in
Hi Will,
When you do {{ site }}, it should follow the rules and print
str(ts_data[...]), which is probably not what you want.
A more pythonic way to do what you want:
{% for site in ts_data.items %}
Site: {{ site.0 }}
Rank: {{ site.1.rank }}
...
{% endfor %}
Cheers,
Mike Axiak
On May
Actually,
doing something similar to this was actually a source of a DoS attack
on PHP [1]. It does seem to me one of the features of Django that
there is little processing done to the actual request.
Cheers,
Mike Axiak
1: http://www.php-security.org/MOPB/MOPB-03-2007.html
On May 3, 11:58 am
of errors = new_data = {}, write out:
errors = {}
new_data = {'drop_selection': 'US'}
I hope this helps!
Cheers,
Mike Axiak
On May 2, 9:34 pm, dbee <[EMAIL PROTECTED]> wrote:
> Guys, I'm trying to preselect a value for a drop down menu by passing
> that menu a value. Probl
processor to get the information you need?
Note that it may be the case that neither of these appropriately match
your problem. In that case, why not write your own 4-line view? You
can even use
function wrappers (in python > 2.3, decorator syntax) to maintain DRY.
Hope this helps.
Cheers,
M
,
Mike Axiak
On Apr 14, 10:34 am, "Mike Hostetler" <[EMAIL PROTECTED]> wrote:
> I've been looking at this for a couple of hours and I have no idea
> what is happening.
>
> In my urls.py I have this:
>
> urlpatterns = patterns('',
> (r'^admin/myap
/.
Cheers,
Mike Axiak
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED
is available at
http://www.djangosnippets.org/snippets/157/
Hope this helps you,
Mike Axiak
On Apr 4, 11:41 pm, queezy <[EMAIL PROTECTED]> wrote:
> Ah, the light just went on (finally!). I will put the http variable in
> where pdfbytes is found.
>
> Thanks Malcolm!
>
a CMS you want, why don't you like
something already created?
Cheers,
Mike Axiak
On Apr 4, 7:20 pm, "Joshua" <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I am completely new to the Django project and have some initial
> questions that I hope someone can answer for me.
&g
d used two inner joins, which IMHO is an incorrect interpretation.
-Mike
On Feb 3, 8:15 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> On 4 Lut, 00:46, "Mike Axiak" <[EMAIL PROTECTED]> wrote:
>
> > y = Q(satprepreginfo__program =
uot;."user_id"
INNER JOIN "program_satprepreginfo" AS "auth_user__satprepreginfo"
ON "auth_user"."id" = "auth_user__satprepreginfo"."user_id"
WHERE (
(
("auth_user__registrationprofile"."program_id" = 6 AN
Hey,
I'm using Django release (currently 0.95.0, waiting for etch to move
to 0.95.1) with some patches (lazyuser patch comes to mind) on an
internal development.
The question is, I was trying to do some Q object combinations and was
met with some weird results:
y = Q(satprepreginfo__program =
28 matches
Mail list logo