Jacob Kaplan-Moss wrote:
> Try::
>
> {% regroup feature.task_set.all|dictsortreversed:"priority" by
> get_priority_display as grouped %}
>
> That is, the "by" argument to {% regroup %} doesn't just have to be a field
> name; it can be anything that a variable could resolve.
Excellent, thanks.
Ro
Hi,
I have an Objects Model and a Tags Model with a M2M relationship
between them. I want to update info about the tags of the object
visited by the user updating it everytime the user requests an Object.
Is it a crazy idea? I want to know wich tags are the most viewed by the
user and wich are th
On 12/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> It doesn't give me anything to go on:
>
> Page not found (404)
> Request Method: GET
> Request URL:http://gretschpages.com/admin/auth/user/1/
>
> You're seeing this error because you have DEBUG = True in your Django
> settings
Found it - a custom manager:
http://www.djangoproject.com/documentation/model_api/#custom-managers
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
Thanks for the explanation Rajesh.
On Dec 4, 2:31 pm, "RajeshD" <[EMAIL PROTECTED]> wrote:
> On Dec 3, 8:36 pm, "Silas" <[EMAIL PROTECTED]> wrote:
>
> > I have a problem with generic.list_detail.object_list, a limiting
> > queryset, and pagination variables.
>
> > For some reason when I use the c
How can one perform a database query from an overloaded admin save function?
I want to retrieve an old value, compare it to the one currently being
saved, then perform an action based on the result of the comparison.
Thanks,
Bret
--~--~-~--~~~---~--~~
You receiv
On 12/5/06, matthew <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Looking at the documentation, I see that you can do "include
> template_name" or "include 'template.html'". I'd like to combine these
> - concatenating a couple of strings and a variable to make the template
> name - but it's not working (
On 12/4/06 4:34 PM, Ross Burton wrote:
> In my view, I'm grouping the data on the priority:
>
> {% regroup feature.task_set.all|dictsortreversed:"priority" by priority
> as grouped %}
> {% for group in grouped %}
> {{ group.grouper }}
>
> However, when I do this, group.grouper expands to "0" o
On 12/4/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
>
> On 12/5/06, Bret Walker <[EMAIL PROTECTED]> wrote:
> >
> > Is there a way to search a CharField contained in a ForeignKey?
>
> Yes. You can traverse any foreign key or m2m relation in Django's query
> language. For example:
>
> Arti
On 12/5/06, Bret Walker <[EMAIL PROTECTED]> wrote:
>
>
> Is there a way to search a CharField contained in a ForeignKey?
Yes. You can traverse any foreign key or m2m relation in Django's query
language. For example:
Article.objects.filter(author__firstname='Bret')
would retrieve all article ob
Are you saying you broke your model?
Mine validate.
Or am I misunderstanding?
--~--~-~--~~~---~--~~
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.c
I had a similar problem the other day. I had made a mistake on one of
my fields of another model, which was edited inline via the User Model.
MerMer
[EMAIL PROTECTED] wrote:
> I just know there's a simple explanation for this, but my brain is
> fried.
>
> My admin area decided today it was g
Will do.
Thanks,
Matthew
On Dec 4, 9:57 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 12/4/06, matthew <[EMAIL PROTECTED]> wrote:
>
> > This is the bit that's not working (viewsurvey.html):
> > {% for question in questions %}
> > {% include 'questions/' + question.get_type_display() +
Hi,
I have a model with an integer field that uses choices for display
names:
class Task(models.Model):
PRIORITY_CHOICES = (
('0', 'Low'),
('1', 'Normal'),
('2', 'High')
)
priority = models.IntegerField(choices=PRIORITY_CHOICES)
In my view, I'm grouping the d
Is there a way to search a CharField contained in a ForeignKey?
If one wants to use a foreign key to prevent repetition and
duplication of data, wouldn't it only make sense that the foreign
key's fields be searchable, as well? Otherwise, the only way to find
records based on the foreign key woul
It doesn't give me anything to go on:
Page not found (404)
Request Method: GET
Request URL:http://gretschpages.com/admin/auth/user/1/
You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard
404 page
On 12/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> When I go to the admin, under "Auth" and click "users" all is well. I'm
> presented with a list of users.
>
> When I try to click one of the users - any of the users - it 404s. Even
> if I click on my own user name.
Try setting DEBUG=True
On 12/4/06, matthew <[EMAIL PROTECTED]> wrote:
> This is the bit that's not working (viewsurvey.html):
> {% for question in questions %}
> {% include 'questions/' + question.get_type_display() + '.html' %}
> {% endfor %}
>
> Why can't I concatenate the strings and variable to include the
> rel
Hi,
Looking at the documentation, I see that you can do "include
template_name" or "include 'template.html'". I'd like to combine these
- concatenating a couple of strings and a variable to make the template
name - but it's not working (no error, but no template included).
This template displays
I downloaded and looked at the django-cart code and noted the views go
cart = request.session.get('cart', None) or Cart()
how can thre session pickle the cart and be accurate if it's stored in
the database or am I confuised? is Django smart enough to know how that
should work and retrive the new
On Dec 3, 8:36 pm, "Silas" <[EMAIL PROTECTED]> wrote:
> I have a problem with generic.list_detail.object_list, a limiting
> queryset, and pagination variables.
>
> For some reason when I use the code below, results are restricted to
> the sliced 100, but all the pagination variables show results a
[EMAIL PROTECTED] wrote:
> Russ,
>
> Because it seems like the cleanest way of pulling together a wide
> variety of content that all pertains to a particular day, or list of
> days.
I would have used an "event" rather than a "day" to model this. You can
still (sensibly imo) argue that
I just know there's a simple explanation for this, but my brain is
fried.
My admin area decided today it was going to start throwing a 404 error
for every user.
When I go to the admin, under "Auth" and click "users" all is well. I'm
presented with a list of users.
When I try to click one of th
The postgres mailing list or IRC channel would generally be better, but
here's some numbers that I got from last year's OSCON in Portland, OR from
the Postgres geeks there.
For a 2Gb RAM machine, a good starting rule of thumb:
shared_buffers = 25000
work_mem = 16384
maintenance_work_mem = 16384
ef
We have two problems that are similar, but would like handled in two
different ways. I have been using django for a few months modifying
and adding to an existing app and have a pretty good feel for how most
of the framework fits together, but some parts still baffle me, like
error handling (even
Hello,
I'm having the same problem as this thread:
http://groups-beta.google.com/group/django-users/browse_thread/thread/b711b5c4579535c8/
Where to call set_test_cookie? Since a POST to authenticate can come
from any page, I need to call set_test_cookie on any page. I'm using
the django.contri
tonemcd wrote:
> Again, thanks heaps for making this available - it's done the business
> for me!
Tone,
Awesome! Glad it worked. :)
Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
You may want to check out django.newforms which is going to be the
replacement for forms and manipulators.
According to a recent threads in the development forum it is already
being used by in some production environments. The formal
documentation is sparse but there is alot of detail in the cod
>
> > Talking through my hat?No, I think not -- I think that syntax
> > (``queryset.groupby(field).max()``)
> actually looks like the best proposal for aggregates I've seen thus far...
>
Sounds pretty good to me. Besides the usual min, max and such, I also
like:
queryset.groupby(field).stats()
Hi,
On 12/3/06, GvaderTh <[EMAIL PROTECTED]> wrote:
>
> Hello All. I read django documentation about forms, had seek internet
> and didn't found solution for situation like this: I have order form
> divided to 3 steeps, after every step should be validation and if
> validation is succesfull, user
Hi Jeff,
On 12/2/06, jeffhg58 <[EMAIL PROTECTED]> wrote:
> I have a custom manipulator and I am trying to set the checkbox default
> to checked.
>
> For example, my field name is:
>
> forms.CheckboxField(field_name="current"),
Pass a 'checked_by_default' argument to the CheckboxField constructor
On 12/4/06, Pythoni <[EMAIL PROTECTED]> wrote:
>
> Eric,
> Thanks a lot.Very good tutorial for me!
> L.
>
Keep in mind that for larger files (I think over 10 megs), FileField
causes very high CPU usage during upload. There is a patch somewhere
in Trac that changes Django to store the file on disk
On 12/3/06, Oliver Andrich <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am currently developing a small Django application for my personal use.
> Now I like to have a date based archive page, and I thought that this
> finally is a good thing to look into generic views. My requirements are,
> that I can
Milan Andric wrote:
> I have a long application form for a workshop (name, employment,
> resume, ... 65 fields). The user logs in to the site via
> django.contrib.auth.view.login, standard django fare. Then the user is
> allowed to apply for workshop xyz. If the user clicks save but does
> not
Eric,
Thanks a lot.Very good tutorial for me!
L.
--~--~-~--~~~---~--~~
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 gro
Dave,
You're right, of course -- I want a ManyToMany field.
The code you suggest doesn't quite work, either, though. Django
wants both models in a many-to-many relationship to inherit from
models.Model.
Here's an interesting hack, though. Just change your first line
to...
On 12/4/06 5:57 AM, John Lenton wrote:
> The "max", "min" and other such functions might be a little more
> problematic, unless groupby returned, rather than a generic iterator,
> a special "queryset group" and give _it_ the max/min/etc methods. This
> way it would be clear that max() returns a tu
I stumbled across your post via jeffcrot.com and this came just right
at the perfect timing.
I just launched my first django app this week end (a site about online
gaming, http://www.netday.be, but beware it's in french) and I run into
some much 500 error trouble that I wasn't really confident.
No I'm using prefork MPM.
On 12/3/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
>
>
> Jakub Labath wrote:
> > Hi All,
> >
> > Sorry for being quiet for a while just got back from a vacation.
> >
> > >
> > > Hi Jakub,
> > >
> > > Do you have any updates on this problem? Was it a mod_python bug?
Congrats! Very good idea!
Regards.
Marcus
On 12/3/06, Loïc (titoo) <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> For interested people, I have wrapped the WSGI CherryPy server to be
> used with Django. With the same wrapper you can start several django
> projects (one cherrypy instance per project)
Hello,
This may be what you're looking for:
python manage.py reset [appname]
Which will regenerate all your application's tables with your new
changes. Be warned, though, that command will delete all the existing
rows in each table.
Good luck,
Darin
On Dec 3, 2006, at 2:09 PM, marksibly
I found this. See if it is what you are looking for.
http://blog.go4teams.com/archives/video-blogging-using-django-and-flashtm-video-flv/56
On Dec 2, 4:36 am, "Pythoni" <[EMAIL PROTECTED]> wrote:
> Hi,
> Has anyone thought /successfully implemented video stream (or movie)
> uploading/playing fea
I found this. See if it is what you are looking for.
On Dec 2, 4:35 am, "Pythoni" <[EMAIL PROTECTED]> wrote:
> Hi,
> Has anyone thought /successfully implemented video stream (or movie)
> uploading/playing feature on a website powered by Django?
>
> L.
--~--~-~--~~~
[EMAIL PROTECTED] wrote:
> We're driving right past each other on the information
> superhighway.
> Thanks for your advice, Russ. It still seems to me that a
> many-to-many relationship between days and events would be desirable,
> for the same reasons that all many-to-many relationships are
Thanks Waylan but...
It appears that when I configure Apache to limit the request body, if a
file is uploaded that exceeds the setting, Apache doesn't seem to pass
on anything to mod_python and records an error in error.log. Thus the
view never gets called so there is no opportunity to raise the
Thanks Waylan but...
It appears that when I configure Apache to limit the request body, if a
file is uploaded that exceeds the setting, Apache doesn't seem to pass
on anything to mod_python and records an error in error.log. Thus the
view never gets called so there is no opportunity to raise the
Ivan Sagalaev wrote:
> Another way is to use 'sites' app and keep domain in a table separately
> for each site.
I thought about that, but this solution is not flexible as 'HTTP_HOST'
variable - I need to add all hosts I want to use.
--~--~-~--~~~---~--~~
You rec
Here is an Easy way to Earn Money. Earn by doing Freelancing Assignments
like Home Typing, Data Entry, Form Entry, Transcription etc. Most of these
jobs can be done from Home with your Personal Computer. At first you can
also work from Browsing Centre. Details at
*http://www.imperialbiz.com/info.as
On 12/1/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
> One way to think about the problem is to consider how you would write
> the documentation for it. "Django implements an object based SQL
> wrapper... except for the aggregations stuff, which you will need to
> know SQL to use properly"
[EMAIL PROTECTED] wrote:
> We are running lighttpd with fastcgi in prefork mode. We tried using
> threaded but django spits out an error about a weakly-referenced
> object, related to sessions I believe, no longer existing.
it's not related to this, by any chance:
http://wolfram.kriesing.de/blo
Phil Powell wrote:
> Perhaps I've not explained myself properly. Here's an example:
>
> I have a "Homepage" which has fields such as "Page Title",
> "Introduction Text", "Footer Text" etc. I want to be able to edit
> these fields just like I'd edit a standard model instance, but because
> ther
What web server are you using in development ? I suspect this might be
a lighttpd / fastcgi problem. Have you tried Apache / mod_python ?
Just as a reference I'm managing 90,000+ hits a day on one Apache on a
UML virtual server, with the load rarely going above 2. With you setup
and Django you
On 12/4/06, Phil Powell <[EMAIL PROTECTED]> wrote:
> I have a "Homepage" which has fields such as "Page Title",
> "Introduction Text", "Footer Text" etc. I want to be able to edit
> these fields just like I'd edit a standard model instance, but because
> there is only one instance of my "Homepage
Brian,
Just a quick note to say *thankyou very much* for making this
available. I installed it into one of my development sites over the
weekend and it works like a charm. I only tried the middleware version
(which is probably more appropriate for an authentication backend) and
found it to work ju
On 04/12/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> I'm not sure I get how a singleton would solve the "pages generated from
> multiple chunks" problem.
>
> why not just use a model that holds (pagename, chunkname, chunk data)
> triplets, and use a view that brings up all the chunks for a give
As this is handled by the browser - you might want to revert to
Javascript. I think there is a plugin for JQuery which handles this.
MerMer
Siah wrote:
> Hi,
>
> I need to hide referrer url on HttpResponseRedirect. I was expecting to
> find something like ReferrerURL in HttpResponseRedirect.he
jeffhg58 wrote:
> I am trying to set the checkboxfield default value to checked but not
> sure how you do it.
>
> Here is my formfield for the checkbox
>
> forms.CheckboxField(field_name="current"),
>
> I tried ading checked="checked" but that did not work.
It's a bit non-obvious... The actual
Phil Powell wrote:
> I want to have a series of pages, with certain areas of content which
> are editable. I don't want to use flatpages, as I'd like the editable
> content to be broken down into chunks, rather than one big lump of
> content.
>
> Is there a way to easily set a model to have one
Alexander Solovyov wrote:
> Sorry, I found answer - META['HTTP_HOST']. :) Documentation keeps
> silence about this. :(
Another way is to use 'sites' app and keep domain in a table separately
for each site.
--~--~-~--~~~---~--~~
You received this message because
Hi all,
Apologies if this has been asked on the list before, but a search
didn't throw up anything relevant.
I want to have a series of pages, with certain areas of content which
are editable. I don't want to use flatpages, as I'd like the editable
content to be broken down into chunks, rather
On 4 Дек., 10:47, "Alexander Solovyov"
<[EMAIL PROTECTED]> wrote:
> But I got problem - request.META['SERVER_NAME'] always set in
Sorry, I found answer - META['HTTP_HOST']. :) Documentation keeps
silence about this. :(
--~--~-~--~~~---~--~~
You received this m
I'm writing multilanguage app, in which i18n happens when client enters
certain domain, like in wikipedia.
But I got problem - request.META['SERVER_NAME'] always set in
ServerName Apache setting, not in queried domain name (which handled in
Apache with ServerAlias *.domain.my).
What can I do to
62 matches
Mail list logo