Dear Django users,
I have a tagging system that uses a GenericForeignKey to assign tags
to generic objects. I would like to write a function that given a
model and a list of tags returns a QuerySet containing all instances
of that model that have been given those tags.
I'm not a huge fan of djang
I'm trying to add a bunch of files from disk into my django database.
Here's the helper function I've written so far:
def django_file(path, field_name, content_type):
# adapted from here:
http://groups.google.com/group/django-users/browse_thread/thread/834f988876ff3c45/
from django.core.f
Awesome! Thanks so much for the help.
Andrew
On Wed, 2010-12-01 at 12:32 +, Tom Evans wrote:
> On Wed, Dec 1, 2010 at 12:23 PM, Andrew Marder
> wrote:
> > I'm trying to add a bunch of files from disk into my django database.
> > Here's the helper function I
Dear Django Users,
I want to restrict usernames to be lowercase alphanumeric characters
like this:
def clean_username(username):
return re.sub(r'\W', '', username).lower()
Now, I'm not sure where is best to do this. I thought it might be
clever to do this using middleware like this:
def pro
Dear Django Users,
I want to add users to a particular group based on the domain of their
email address. I set up some code in models.py to do this and it seems
to work. But, when I go to test the code things don't work out so
smoothly. I think in the test environment the objects I try to create
i
Hi Shawn,
I've pasted the traceback below, I need to write some more tests to
give you better information.
Andrew
$ python manage.py test user_management
Creating test database for alias 'default'...
..F
==
FAIL: test_user_added
Has anyone had any luck setting up testing databases with mongo? Right
now I'm using pymongo in a single app, and I thought it would be cool
if in that app I could see if my code was being tested and in that
case I could use a different database. Problem is there doesn't seem
to be an environment v
t; On 20 January 2011 22:26, Andrew Marder wrote:
>
> > Has anyone had any luck setting up testing databases with mongo? Right
> > now I'm using pymongo in a single app, and I thought it would be cool
> > if in that app I could see if my code was being tested and in tha
8 matches
Mail list logo