Coming from a non python/django background (my experience is groovy/
grails), but when we test our controllers (I think this is equivalent
to django views). We simply set up mock params on the request and set
expectations on the controller properties.
Simple example:
given:
request.params = [
Thanks guys that was perfect
On Apr 14, 3:53 pm, Alex Gaynor wrote:
> On Tue, Apr 14, 2009 at 10:50 AM, veearrsix wrote:
>
> > Thanks for the help so far guys, I've used that recipe suggested by
> > Malcolm, where by I pass a number of querysets into the method. It
Thanks for the help so far guys, I've used that recipe suggested by
Malcolm, where by I pass a number of querysets into the method. It
works as expected I guess, BUT, I would like to be able to sort by the
datetime field from each queryset, however the fieldnames for each of
the date time fields f
This question seems to have been asked a few times, but never answered
fully.
I am looking to query more than one table, but return the results to a
template as one queryset ordered by date.
The reason i'm doing this is to create a single queryset including
information from a blog table, twitter
Hi,
I'm trying to list latest comments using the comments contrib in my
django app, I would like to list both comments from users who are
staff ('is_staff' in the auth_user table), and comments from users who
are NOT staff members.
My question is, how do I create 2 lists, 1 with the comments fro
I too am having trouble with querying across multiple tables.
my (simplified) models:-
class Channel(models.Model):#blog
name = models.CharField("Name", maxlength=30)
slug = models.SlugField("URL", prepopulate_from=('name',))
class Admin:
pass
de
I've recently added the sites framework but i'm noticing that the
SITE_ID (settings.SITE_ID), is returning an id of a site that doesn't
exist. I'm running on the development server @127.0.0.1:8000, this
obviously doesn't relate to any of the sites that I have added within
the sites table.
It is a
7 matches
Mail list logo