On Tue, Oct 26, 2010 at 12:40 PM, Phlip wrote:
>
> So this statement correctly fetches only the latest items:
>
> SELECT a.* FROM things a WHERE a.pid in (select max(b.pid) from
> content_entity b group by b.name)
>
> Now I thought (from my allegedly copious experience with
I think nother problem is your polls/urls.py is wrong. The /polls
prefix of the url will be removed by the main urls.py file before
being matched against the included polls/urls.py
http://docs.djangoproject.com/en/1.2/topics/http/urls/#including-other-urlconfs
On Sun, Oct 17, 2010 at 4:52 AM,
doh! Just noticed that you already referenced ticket 10154 in your
original post.
On Fri, Oct 15, 2010 at 3:16 PM, Alec Shaner <asha...@chumpland.org> wrote:
> Interesting solution - after all that maybe it's more concise to just
> use the 'extra' filter instead since you're making
() + timedelta.
http://code.djangoproject.com/ticket/10154
On Fri, Oct 15, 2010 at 2:48 PM, Marc Aymerich <glicer...@gmail.com> wrote:
>
>
> On Fri, Oct 15, 2010 at 7:54 PM, Alec Shaner <asha...@chumpland.org> wrote:
>>
>> On Fri, Oct 15, 2010 at 1:26 PM, Marc Aymeri
On Fri, Oct 15, 2010 at 1:26 PM, Marc Aymerich wrote:
>
> Instead of use datatime.timedelta I convert it to string with this format:
> MMDDHHMMSS and now all works fine with mysql :) Unfortunately this part
> of code doesn't be database independent :(
>
> Thank you very
It should be clarified that this occurs on the mysql backend, but not
the postgres backend. It has to do with how MySQL handles the DATETIME
object. You can't add a timedelta, because it expects a double.
I created a test app using a mysql backend and a Article model with
created and updated
Sorry, not sure about that warning because I'm using a postgresql database.
On Fri, Oct 15, 2010 at 3:17 AM, Marc Aymerich <glicer...@gmail.com> wrote:
>
>
> On Fri, Oct 15, 2010 at 3:39 AM, Alec Shaner <asha...@chumpland.org> wrote:
>>
>> You can't add a dateti
Aymerich <glicer...@gmail.com> wrote:
>
>
> On Thu, Oct 14, 2010 at 10:08 PM, Alec Shaner <asha...@chumpland.org> wrote:
>>
>> See this:
>>
>> http://ifacethoughts.net/2009/07/14/calculated-fields-in-django/
>>
>> So perhaps the 'extra' query f
See this:
http://ifacethoughts.net/2009/07/14/calculated-fields-in-django/
So perhaps the 'extra' query filter is what you need.
2010/10/14 Marc Aymerich :
>
>
> 2010/10/14 Marc Aymerich
>>
>>
>> 2010/10/14 Jonathan Barratt
On Thu, Oct 14, 2010 at 3:45 AM, Sheena wrote:
> I also want to have the option to add any attachment. So I want to
> have a button that when pressed allows the user to pick a file on
> their hdd and have it uploaded immediately, without loosing anything
> that's
Definitely sounds like a regular expression is what you need.
Not sure what you mean by etcare you saying any variation of a web
address for mysite.com, i.e., with or without www prefix, with our
without protocol http://, and with our without the index page, which
itself could be any
Also, if you're using mod_wsgi (recommended over mod_python), see this:
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
On Thu, Sep 30, 2010 at 12:12 PM, Addy Yeow wrote:
> runserver takes care of thing like this for you but you need to handle
> it properly in
As to whether it's a bug or not I have no idea, though it seems so.
If you use:
entity = models.OneToOneField(Entity, parent_link=True, primary_key=True)
it will create the primary key in both Kid and Adult tables, which
sounds like what you want?
On Tue, Sep 28, 2010 at 1:06 PM, phill
Try this:
I'm assuming you define Article.category as a ManyToMany field? I also
assumed for the example that Category has a name field.
# Build a queryset of all categories not in desired set, e.g., 'Exact1' and
'Exact2'
bad_categories = Category.objects.exclude(category_name__in=['Exact1',
Maybe this is what you want:
http://docs.djangoproject.com/en/1.2/topics/db/aggregation/#filtering-on-annotations
On Mon, Sep 13, 2010 at 3:32 PM, Phlip wrote:
> Djangoids:
>
> Consider this QuerySet:
>
> Blog.objects.filter(comment__date__range=(self.yesterday,
>
Excellent. Glad you got it working.
On Fri, Sep 10, 2010 at 8:54 AM, Bradley Hintze wrote:
> I got to work! I needed a good nights sleep to see it. the url was
> '/DHM_run/' NOT '/run_DHM/'.
>
> Thanks Alec
>
>
--
You received this message because you are
o do this? In other words, what are the
> If_come_from_pageA and If_come_from_pageB conditions? Can I access the
> context dictionary that I passed to please_wait.html?
>
> On Thu, Sep 9, 2010 at 11:23 AM, Bradley Hintze
> <bradle...@aggiemail.usu.edu> wrote:
> > Yeah, I just tried out w
ata? If so, how?
>
>
> On Thu, Sep 9, 2010 at 10:37 AM, Alec Shaner <asha...@chumpland.org>
> wrote:
> > I feel your pain - javascript has always been a pain for me, but
> libraries
> > like jQuery make it more bearable!
> >
> > AJAX calls are made
me/$', side_by_side_frame),
> (r'^DHM_run/$', run_DHM),
>(r'^please_wait/', please_wait),
> (r'^analyze/$', analyze_compare),
> )
>
>
> On Thu, Sep 9, 2010 at 9:22 AM, Alec Shaner <asha...@chumpland.org> wrote:
> > Could you post the full url
Could you post the full url.py file?
And as Brian mentioned your javascript block should be separated. Plus you
have an extra }); that's going to fail once you resolve this reverse error.
It's also not clear what you intend to happen when run_DHM returns its
response? It looks like your intent is
be a real HTML page as
> an example or a live example on the web. I am sorry for the trouble
> but I'd like to understand this and get it working.
>
> On Tue, Aug 31, 2010 at 7:37 PM, Alec Shaner <asha...@chumpland.org>
> wrote:
> > $.getJSON should be embedded in your in
Perhaps see:
http://docs.djangoproject.com/en/1.2/topics/forms/formsets/
where it talks about the "extra" keyword that controls how many blank forms
to add, the default is 1
On Wed, Sep 1, 2010 at 5:31 PM, ses1984 wrote:
> Basically I have a queryset with N items in it,
$.getJSON should be embedded in your initial Page Wait response page. The
first argument isn't a view, rather a URL. So you might want to use the
django url template tag, e.g.,
$.getJSON('{% url whatever.run_DHM %}', ...)
The second argument is a callback function. The browser stores the
Rolando's suggestion is a pretty straight forward method to achieve what you
want. You probably need to elaborate where in the process you're having
trouble (although based on your response maybe it's the first step?). You
can indeed call a view.my function from your please wait template, but you
You could set a context variable, e.g., listing_operation = 'Edit' or
'Create'. Or you could use different templates, each inheriting a common
template and only doing minor tweaks.
On Tue, Aug 24, 2010 at 9:04 AM, reduxdj wrote:
> I have some decisions i need to make
You could use a context processor to read the flatpage table to build the
menu. If you want more control over the menu then create a Menu model and
store the flatpage links there and again build the menu in a context
processor. You would probably want to use some level of caching if you don't
want
1. What is your code for doing the filters? If you want to start with
physical drives it would be something like:
RaidPhysicalDrive.objects.filter(in_array__in_storage__in_system__id=)
2. In your template you've referenced pd.in_array_id, but don't you just
want pd.in_array if you're wanting to
Regarding your issue with get_next, could be because you're invoking the
method when you define default=get_next(). Try it with just the bare method
name get_next.
You could also use the aggregate function instead of creating a new model:
Hopefully some django sql guru will give you a better answer, but I'll take
a stab at it.
What you describe does sound pretty tricky. Is this something that has to be
done in a single query statement? If you just need to build a list of
objects you could do it in steps, e.g.:
# Get all State
You can't use a dictionary if you expect a certain order of key/value pairs.
Given model A you could get a list of field objects in the same order (I
think) as defined in the model class
A._meta.fields
At least with that information you could programatically produce a list of
data in matching
The "new" values are what you just set: in your example, self.a=3 and
self.b=4 if you're inside your custom save method. Then you can get the
current values from the database from inside your custom save with something
like:
current = Foo.objects.get(pk=self.pk)
and inspect current.b for special
with apache. If you put
that in your code and it has UTF-8 in both cases then this issue is beyond
me.
On Wed, Aug 4, 2010 at 4:10 PM, sohesado <gnubun...@gmail.com> wrote:
>
>
>
> On Aug 4, 6:48 pm, Alec Shaner <asha...@chumpland.org> wrote:
> > I'm no expert on e
to use the system default locale
> instead:
> #. /etc/default/locale
>
> export LANG
>
> -
>
> Have you got any clues what may cause the problem?
>
> Thank you for your help.
>
> On Aug 3, 11:31 pm, Alec Shaner <asha...@chumpland.org> wrote:
> > unicode giv
unicode gives me nightmares.
Taking django out of the picture for a moment:
>>> unicode('foo', 'utf-8')
u'foo'
>>> unicode(u'foo', 'utf-8')
Traceback (most recent call last):
File "", line 1, in
TypeError: decoding Unicode is not supported
So I would assume when you run it inside django
Based on what you described as your intent, have you looked at
ModelChoiceField? You could create a new table, e.g. ProductOptions, that
has a foreign key to your Product table. In your form class you can then
pass a queryset into the ModelChoiceField that selects only the options for
that
you can try gmail to test too
http://ltslashgt.com/2007/07/02/gmail-and-django/
On Feb 17, 9:38 am, Marco Rogers wrote:
> Check out this solution for testing emails when in development. It
> allows you to use send_mail and the email output is printed to the
> terminal
i just added a csv export as an admin action from details here
django csv
http://docs.djangoproject.com/en/1.1/howto/outputting-csv/#howto-outputting-csv
admin actions
http://docs.djangoproject.com/en/1.1/ref/contrib/admin/actions/#ref-contrib-admin-actions
On Feb 17, 7:49 am, Shawn Milochik
comments for the flatpage
{% get_comment_list for flatpage as comment_list %}
{% for comment in comment_list %}
{{ comment }}
{% endfor %}
loads a form to submit new comments
{% render_comment_form for flatpage %}
On Feb 16, 6:43 pm, shaner <shane.n...@gmail.com> wrote:
> anyone setup
anyone setup comments with flatpages?
doesn't appear to be documented anywhere other than each individually,
maybe nobody wants it to be too easy
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I'm trying to make a model's detail view, take movies for example;
actors are m2m to movies
this works but it doesn't feel right is there, i pass this context to
the template where i for loop through the actor list
>>> Movie.objects.filter(pk=movie_id)[0].character.all()
[, ]
--
You received
INSERT INTO table (col1,col2) SELECT col1,col2 FROM table2
is what i'm trying do, copy some columns from one table to one in
django, i get constraints failed
i made a test db and tested this and worked, copied the two columns to
another table fine, also tried recreating the model w/ blank=true
new to django, i'm looking for some documentation on how i can
populate one model with data from another one is there a dry method
for that? i've seen the examples for populating user or slug but i'd
just like to go from one model to another
for example a support ticket model, and an office
42 matches
Mail list logo