Re: Packaging and development workflow for decoupled apps.

2011-03-11 Thread DaleB
Thank you for all your insights. > I think you are stuck in the monolithic point of view.  I'm also not sure if > you understand that django apps are python modules and the same rules apply.   > > The apps location within the PYTHONPATH is immaterial to a project, as long as > the project can find

Re: What is the best server for Django

2011-03-11 Thread shofty
i tried djangohosting.ch after webfaction. webfaction have better support response times which as a noob i needed. wf have some incredibly knowledgable staff on their support team. so it depends what you want. dh have a great installer, so long as you know what you're doing they're a good choic

Re: What is the best server for Django

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 01:33 -0800, shofty wrote: > i tried djangohosting.ch after webfaction. webfaction have better > support > response times which as a noob i needed. wf have some incredibly > knowledgable staff on their support team. so it depends what you want. > dh > have a great installer

Re: Multiple modelforms in single POST

2011-03-11 Thread bruno desthuilliers
On 11 mar, 07:58, Anoop Thomas Mathew wrote: > Hi all, > > I have a Profile model, which has a ForiegnKey to User model. I want to edit > both of it at same form. > > this is what I tried,http://dpaste.de/ODOJ/ > Still, no success. Please help. You'll have to provide a bit more informations if

Help with Apache/Nginx combo

2011-03-11 Thread maciekjbl
Hi, I know this topic was discussed a lot, but in every post for this topic there are diffrent configuration and this stop helping for me. Long story short : I changed DEBUG = True to False and all static media are gone, so this is something wrong in web server conf. #settings.py# impor

Re: Simple Django Report Generator

2011-03-11 Thread Venkatraman S
On Fri, Mar 11, 2011 at 9:32 AM, Bruno Tikami wrote: > have you tried Geraldo Reports [0] ? It's flexible, easy to use and worth a > look ;-) > Looks neat - i havent tried it, but does it support non-pdf output too? -- You received this message because you are subscribed to the Google Groups

Deploying django. Please specify the steps.

2011-03-11 Thread balu
Hi all :) I tried to deploy django with the following. But I couldn't able succeed. Please let me know the exact steps in configuring apache server, configuring mod_wsgi. I had gone through the official site. But couldn't understand it completely the configuration process. apache, mod_wsgi, ngin

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 04:17 -0800, balu wrote: > I tried to deploy django with the following. But I couldn't able > succeed. Please let me know the exact steps in configuring apache > server, configuring mod_wsgi. > > I had gone through the official site. But couldn't understand it > completely th

Re: Why does Django Fail on Date Field?

2011-03-11 Thread octopusgrabbus
It's a date format MySQL will accept into a date field. On Mar 10, 8:07 pm, Kenneth Gonsalves wrote: > On Thu, 2011-03-10 at 09:46 -0800, octopusgrabbus wrote: > > load_date = '-00-00' > > what on earth is this? > -- > regards > KGhttp://lawgon.livejournal.com > Coimbatore LUG roxhttp://ilugc

Order of WHERE statements in filter

2011-03-11 Thread galgal
I want to make a specific odrer of WHERE statements in my query to use multicolumn index in database. But oder in code is not the same as result query: code: filter(user=self.user, province=self.province, city=self.city) Mysql result: WHERE (`accounts_usercity`.`province_id` = 6 AND `accounts_us

Re: Simple Django Report Generator

2011-03-11 Thread Gennadiy Zlobin
> [0] http://geraldoreports.org/ > Doesn't work without www http://www.geraldoreports.org - Gennadiy -- 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

Re: Why does Django Fail on Date Field?

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 04:28 -0800, octopusgrabbus wrote: > It's a date format MySQL will accept into a date field. I suppose it can be used for recording Adam's date of birth? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this messag

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Xavier Ordoquy
Le 11 mars 2011 à 13:25, Kenneth Gonsalves a écrit : > On Fri, 2011-03-11 at 04:17 -0800, balu wrote: >> I tried to deploy django with the following. But I couldn't able >> succeed. Please let me know the exact steps in configuring apache >> server, configuring mod_wsgi. >> >> I had gone through

Re: Help with Apache/Nginx combo

2011-03-11 Thread krzysiekpl
In my opinion you should add alias in nginx.conf for admin media files. Put this code in server{} # admin uses admin-media/ # alias works different than root above by dropping admin- media location ^~ /media/admin/ { alias /usr/local/lib/python2.6/dist-packages/django/

request.user.save() doesnt work

2011-03-11 Thread Ndungi Kyalo
Hi guys. Am using django non-rel on appengine. I am using django's auth backend for my authentication, since I did not want to have to force my users to use gmail logins, and appengine models {google.appengine.ext.db} for the other models. I have a form where I allow users to edit their email. So :

No fixtures found

2011-03-11 Thread Shakthi Kannan
Hi, I am just getting started with Django (1.2.5) on Fedora. I would like to create separate test data files to be loaded to the test database for each test case for the mysite/ app. I have the following code snippets (based on the Django tutorial): === mysite/polls/tests.py === from django.test

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 13:40 +0100, Xavier Ordoquy wrote: > >> I had gone through the official site. But couldn't understand it > >> completely the configuration process. > >> > >> apache, mod_wsgi, nginx, mysql on ubuntu 10.10 > > > > first make up your mind - do you want apache or nginx? You ca

Re: Deploying django. Please specify the steps.

2011-03-11 Thread balu
Here is the error log sir. [Wed Feb 09 22:23:25 2011] [notice] Apache/2.2.16 (Ubuntu) configured -- resuming normal operations [Wed Feb 09 23:28:09 2011] [notice] caught SIGTERM, shutting down [Wed Mar 09 20:10:30 2011] [notice] Apache/2.2.16 (Ubuntu) configured -- resuming normal operations [We

Re: No fixtures found

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 16:48 +0530, Shakthi Kannan wrote: > No fixtures found. I tried this out after you brought it up in IRC and made the smallest possible test. It works for me regardless of what name I give the fixtures file as long as it is in the fixtures directory of the application. You mus

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 04:46 -0800, balu wrote: > Here is the error log sir. nobody asked you for the apache error log. To repeat: please paste the following: 1. what error does your browser show 2. the relevant part of your apache config file (please do not post the whole config file) 3. your dj

Error on aggragate function-Count

2011-03-11 Thread pols
hai I have two models as shown belove from django.db import models from django.db.models import Sum # Create your models here. class polls(models.Model): question = models.CharField(max_length=200) pubish_date = models.DateTimeField('Date published') def __unicode__(self):

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Jirka Vejrazka
OK - I'm going to ask the obvious question here - have you made sure that Apache web server user can read ALL your configuration files? The log reveals that there are permission problems on .htaccess file that is stored in your home directory (where Apache can't reach by default). I'm going to make

Re: When do we stop using Django admin?

2011-03-11 Thread Dan Gentry
I tend to use the Admin for internal tasks - ones that would be performed by a application or system administrator. These are people that understand the data structure and know things like the effects of a cascaded delete. For users, even a customer 'admin' person, I would write my own views that

Re: Deploying django. Please specify the steps.

2011-03-11 Thread balu
1. When I open "http://localhost/"; page, it is an error message "Forbidden. You don't have permission to access / on this server". 2. with in /etc/apache2/sites-available/ directory I created a file named "locahost". In that I placed the Virtual Host settings. NameVirtualHost *:80 DocumentRoo

Re: What is it with Django and 2008?

2011-03-11 Thread Artem
I guess it's because of Django v1.0 release - people started to consider it like stable production-safe framework. So most of Django books came out after that, though most of them have few revisions to be up to date, but in searches first revision usually most noticeable. -- You received this mes

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Graham Dumpleton
Go watch: http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations That presentation explains a lot about permissions and other errors you can. Recommend that before you even try and get Django running that you get a WSGI hello world script running. Use what is shown i

Re: Django app and Amazon AWS (beginner)

2011-03-11 Thread Graham Dumpleton
One can if you want to get a development system closer to production use Apache/mod_wsgi in such a way that automatic code reloading on any change works, just like Django development server. See: http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html http://blog.dscpl.com

Django models and inheritance

2011-03-11 Thread Mark J. Nenadov
Hello folks, I'm a long time Python developer that is new to Django. I have a few questions about the role of inheritance in the models for an app. As I build my models, I'm finding at least somewhat of a need to start doing some inheritance, and if not a need--at least a design-related desire t

Re: Packaging and development workflow for decoupled apps.

2011-03-11 Thread Mike Ramirez
On Friday, March 11, 2011 12:41:52 am DaleB wrote: > One last point. > Now, how do i deal best with different versions/branches of my app? Do > you just switch branches while developing or do you use pip in project > env to refer and switch to different tags/branches in your sourcecode. > The firs

Re: Packaging and development workflow for decoupled apps.

2011-03-11 Thread DaleB
I guess i wasn't clear enough. I am not so much concerned with when to use tags and when to use branches. I am still looking for a smooth development workflow. I created a libs-dir which i put on my python path an put my different apps in it. Okay, now i can refer to my apps from any project withou

Introspecting a ManyRelatedManager

2011-03-11 Thread mukappa
Hi, I am looking for the most straightforward way to introspect the model field name a ManyRelatedManager is bound to. from django.db import models class Topping(models.Model): pass class Pizza(models.Model): toppings = models.ManyToManyField(Topping) def get_fieldname(manager):

Re: What is the best server for Django

2011-03-11 Thread andreap
Im using webfaction and its the best! I have 2 question, 1 How can I make an online backup with webfaction? 2 I start to have new customers and I need a hosting to resell to my customers. Can I use webfaction but actually I can only buy new ram for my hostcan I buy one hosting per customer

Re: Packaging and development workflow for decoupled apps.

2011-03-11 Thread Mike Ramirez
On Friday, March 11, 2011 07:52:22 am DaleB wrote: > I guess i wasn't clear enough. I am not so much concerned with when to > use tags and when to use branches. > I am still looking for a smooth development workflow. > I created a libs-dir which i put on my python path an put my different > apps in

Re: Why does Django Fail on Date Field?

2011-03-11 Thread octopusgrabbus
I could easily have used the Informix "null" date of 12/31/1899, but chose that instead. I put the dates into a table, so when they were processed they'd be set to a real date, today's. On Mar 11, 7:39 am, Kenneth Gonsalves wrote: > On Fri, 2011-03-11 at 04:28 -0800, octopusgrabbus wrote: > > It'

Re: Packaging and development workflow for decoupled apps.

2011-03-11 Thread Bill Freeman
On Fri, Mar 11, 2011 at 3:41 AM, DaleB wrote: > One last point. > Now, how do i deal best with different versions/branches of my app? Do > you just switch branches while developing or do you use pip in project > env to refer and switch to different tags/branches in your sourcecode. > The first ap

Re: Packaging and development workflow for decoupled apps.

2011-03-11 Thread Tom Evans
On Fri, Mar 11, 2011 at 3:52 PM, DaleB wrote: > I guess i wasn't clear enough. I am not so much concerned with when to > use tags and when to use branches. > I am still looking for a smooth development workflow. > I created a libs-dir which i put on my python path an put my different > apps in it.

Chaining stacked inline

2011-03-11 Thread gontran
Hi, I'm wondering if it's possible to chain StackedInlined object in a django admin page. Let me explain it: I have a class UserProfile which is linked by a OneToOneField to the django auth module class User. By this way (which is recommended) I store additionnal informations about my users. In th

Sum in html template using template tag

2011-03-11 Thread sushanth Reddy
Hi , I am trying to sum in HTML,but template tag return 0 , View.py def gen_Report(request): ### query returns below output list=[{'total': 1744, 'user': u'x'}, {'total': 13, 'user': u'y'}, {'total': 126, 'user': u'z'}, {'total': 46, 'user': u'm'}, {'total': 4, 'user': u'n'}

Re: django remove unicode from query result ?

2011-03-11 Thread sushanth Reddy
Hi JAson, Thanks a ton,it worked -- 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 group, send email to django-users+unsubscr...@googlegroups.com. For m

How to limit a ManyToManyField to three choices?

2011-03-11 Thread greenie2600
Hi all - I have two models with a many-to-many relationship: Restaurant and Cuisine. The Cuisine table contains, e.g., "Italian", "Mexican", "Chinese", etc. Each Restaurant record can be associated with one or more Cuisines. Here's the thing: I'd like to limit this to three Cuisines per Restauran

Re: Error on aggragate function-Count

2011-03-11 Thread Jason Culverhouse
On Mar 11, 2011, at 5:02 AM, pols wrote: > hai > I have two models as shown belove > > from django.db import models > from django.db.models import Sum > # Create your models here. > class polls(models.Model): > question = models.CharField(max_length=200) > pubish_date = models.DateTime

caching static/domain tables

2011-03-11 Thread Cesar Devera
I have in my models, some tables that hold static information, like status codes, types and descriptions, for example: in models.py: class CustomerStatus(models.Model): name = models.CharField() class CustomerType(models.Model): name = models.CharField() class Customer(models.Model):

cache and anonymous only

2011-03-11 Thread plungerman
greetings, we are using django trunk, updated from time to time. we were using revision 13303, and then wanted to update to the current revision (15776 at the time). upon updating to 15776, the caching behaviour of our apps changed. we are using CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True and authenti

django frontend to openmesh radius

2011-03-11 Thread yolabingo
I put a simple Django site (using only admin so far) in front of a MySQL DB used as a backend by a freeradius server. For each radius user, I need to update the 'radcheck' table, which contains one or more attributes for each user. +---+-- | Field| Type +--

Re: request.user.save() doesnt work

2011-03-11 Thread Daniel Roseman
On Thursday, March 10, 2011 11:59:15 PM UTC-8, Ndungi Kyalo wrote: > > Hi guys. Am using django non-rel on appengine. I am using django's > auth backend for my authentication, since I did not want to have to > force my users to use gmail logins, and appengine models > {google.appengine.ext.db} f

Re: request.user.save() doesnt work

2011-03-11 Thread Jason Culverhouse
On Mar 11, 2011, at 10:46 AM, Daniel Roseman wrote: > On Thursday, March 10, 2011 11:59:15 PM UTC-8, Ndungi Kyalo wrote: > Hi guys. Am using django non-rel on appengine. I am using django's > auth backend for my authentication, since I did not want to have to > force my users to use gmail login

Re: Django models and inheritance

2011-03-11 Thread Michal Petrucha
> If I have my abstract super classes inherit models.Model, things > technically can work. However, I arrive with a rather overly complex > SQL design generated from them (like needless tables for abstract > super classes). > > On the other hand, if I have my abstract super classes NOT inherit >

How to have user defined fields

2011-03-11 Thread ydjango
How can I have "user defined fields" ( not field types). So user will define some custom fields (with standard types) and it will be shown and available to all members of his group on screens and forms. -- You received this message because you are subscribed to the Google Groups "Django users

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread gontran
Hi greenie, you just need to override the save method from your model Restaurant. Before saving each instance, you check if the restaurant already has 3 Cuisine's objects associated. If yes, you don't save the instance and raise an error for exemple, if no, just call the standard method of the su

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread gontran
edit: you don't need to raise an error if the restaurant already has 3 Cuisine's objects associated, you just need to return a string with the explanation of the error. On 11 mar, 20:11, gontran wrote: > Hi greenie, > > you just need to override the save method from your model Restaurant. > Befor

Django-voting

2011-03-11 Thread ydjango
I see this project is an old project http://code.google.com/p/django-voting/ Not sure if it is actively maintained anymore. is this the one I should look into using or is there a newer one that super seeded this app. -- You received this message because you are subscribed to the Google Groups "

Re: Help with Apache/Nginx combo

2011-03-11 Thread maciekjbl
Reload, restart and still nothing. I have my admin-media syn-linked to my media folder, is it wrong ? Because I see alias to this folder. >From apache error log I know only that every request get [error 500]. On 11 Mar, 13:42, krzysiekpl wrote: > In my opinion you should add alias in nginx.conf

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread bagheera
Dnia 11-03-2011 o 18:06:43 greenie2600 napisał(a): Hi all - I have two models with a many-to-many relationship: Restaurant and Cuisine. The Cuisine table contains, e.g., "Italian", "Mexican", "Chinese", etc. Each Restaurant record can be associated with one or more Cuisines. Here's the thing:

Re: django frontend to openmesh radius

2011-03-11 Thread yolabingo
I think proxies are the solution. I am struggling to wrap my head 'round this concept, but I believe this will be helpful: http://lincolnloop.com/blog/2010/dec/16/using-proxy-models-customize-django-admin/ -- You received this message because you are subscribed to the Google Groups "Django user

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread greenie2600
gontran - Thanks. However, I tried the sample code in your link, and I don't think it will work. Returning a string from the overridden save() method prevents the record from being saved to the database, but by the time the save() method is invoked, my ModelForm (and consequently, I presume, the

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread greenie2600
bagheera - I had seen the limit_choices_to parameter, but I thought it controlled *which* choices are available to the user - not *how many* they're allowed to choose. I want to show the user a list of 20 or 30 cuisines, but forbid them from checking more than three. Can you show me an example o

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread bagheera
Dnia 11-03-2011 o 21:23:38 greenie2600 napisał(a): gontran - Thanks. However, I tried the sample code in your link, and I don't think it will work. Returning a string from the overridden save() method prevents the record from being saved to the database, but by the time the save() method is i

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread bagheera
Dnia 11-03-2011 o 21:29:29 greenie2600 napisał(a): bagheera - I had seen the limit_choices_to parameter, but I thought it controlled *which* choices are available to the user - not *how many* they're allowed to choose. I want to show the user a list of 20 or 30 cuisines, but forbid them from

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread bagheera
Dnia 11-03-2011 o 21:29:29 greenie2600 napisał(a): bagheera - I had seen the limit_choices_to parameter, but I thought it controlled *which* choices are available to the user - not *how many* they're allowed to choose. I want to show the user a list of 20 or 30 cuisines, but forbid them from

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread bagheera
Dnia 11-03-2011 o 21:39:01 bagheera napisał(a): Dnia 11-03-2011 o 21:29:29 greenie2600 napisał(a): bagheera - I had seen the limit_choices_to parameter, but I thought it controlled *which* choices are available to the user - not *how many* they're allowed to choose. I want to show the us

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread werefr0g
Hello, Can Model.clean() method help you? [1] You'll still have to pay attention to validation before trying to save your instances.[2] Regards, [1] http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.clean [2] http://docs.djangoproject.com/en/dev/releases/1.2/

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread gontran
I didn't try it, but werefr0g may be right. It seems that Model.clean() is the method do you need. And you can still add a javascript control for more convenience without the risk that if a user deactivate javascript, the error will be saved. Let us know greenie if it's ok with this method. On

Apache mod_wgsi

2011-03-11 Thread groovyroovy
On Ubuntu 10.10, the libmod_wgsi uses Python 3.1. Will this be incompatible with Django? Must I compile the mod_wgsi for Python 2.6? Thanks much in advance, gr -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How do I run test and get results programmatically? (django, south, fixtures, sqlite)

2011-03-11 Thread Jumpfroggy
I have an app that I'm starting to write tests for. The app uses south for all migrations and mysql for the db. I wrote some tests and also created an initial_data.json fixture to provide some default data. If I run "python manage.py test", the database is created via sqlite, the tests are run,

Re: Apache mod_wgsi

2011-03-11 Thread Karen Tracey
On Fri, Mar 11, 2011 at 4:21 PM, groovyroovy wrote: > On Ubuntu 10.10, the libmod_wgsi uses Python 3.1. Will this be > incompatible with Django? Must I compile the mod_wgsi for Python 2.6? > > I don't believe so, per this thread: http://groups.google.com/group/modwsgi/browse_thread/thread/796974f

How to use CreateView?

2011-03-11 Thread hassan
Hi, I am testing django 1.3 class based generic views. I have a model like this one: class Book(models.Model): name = models.CharField(max_length=50) author = models.CharField(max_length=50) and in views.py: class BookUpdateView(CreateView): model = Book template_name = "create_

Authentication Using django.contrib.auth.middleware.AuthenticationMiddleware

2011-03-11 Thread hank23
I'm trying to use the the built-in authentication framework/middlework but so far haven't figured out how to use it correctly. I'm just starting a new project with this and I have placed the "@login_required" decorator in front of my first view and want to force the user to login at this time. I ha

Re: How to limit a ManyToManyField to three choices?

2011-03-11 Thread greenie2600
werefr0g— Yep, that's actually the solution I'm looking into right now. However, I'm getting an error when trying to save a new instance of the Restaurant model: "'Restaurant' instance needs to have a primary key value before a many- to-many relationship can be used." Here's the new code that's

Re: Sum in html template using template tag

2011-03-11 Thread Victor Harada
Hi You should use {{ list | running_total }} and the filter should look like this: from django.template import Library register = Library() @register.filter def running_total(role_total): return sum( [d.get('total') for d in role_total] ) 2011/3/11 sushanth Reddy > Hi , > > I am trying t

Re: What is it with Django and 2008?

2011-03-11 Thread Venkatraman S
On Fri, Mar 11, 2011 at 5:59 AM, Benjamin Roberts wrote: > So I don't mean to be confrontational at all. I am learning Django > and really like it. We all do :) > I'm forming a startup and we've already decided > to go with it to build our applications. I think Python/Django is perfect for

file upload size problem

2011-03-11 Thread vamsy krishna
Hi, I'm doing a file upload from one of my forms and writing the content to a temp file on the server. The problem is any file of size more than 250 KB is throwing the below error: Request Entity Too Large The requested resource /tera/tera_upload/ does not allow request data with POST requests, o

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 05:34 -0800, balu wrote: > 1. When I open "http://localhost/"; page, it is an error message > "Forbidden. You don't have permission to access / on this server". see if your home directory has an 'x' permission at the end: drwx--x--x 103 lawgon lawgon 4096 2011-03-11 18:

test cannot find assertContains

2011-03-11 Thread Kenneth Gonsalves
hi, I am trying to run a test using assertContains, but get this error: AttributeError: 'SourceTestCase' object has no attribute 'assertContains' my code: from django.utils import unittest from incident.models import Source from django.test.client import Client class SourceTestCase(unittest.

Re: test cannot find assertContains

2011-03-11 Thread Mike Ramirez
On Friday, March 11, 2011 10:19:27 pm Kenneth Gonsalves wrote: > hi, > > I am trying to run a test using assertContains, but get this error: > > AttributeError: 'SourceTestCase' object has no attribute > 'assertContains' > > my code: > > from django.utils import unittest from django.test impor

Re: test cannot find assertContains

2011-03-11 Thread Mike Ramirez
On Friday, March 11, 2011 11:04:39 pm Mike Ramirez wrote: > assertContains is a django specific test and located in test.TestCase with > the others (you can find TransactionTestCase in there also). > I should also add, TransactionTestCase is the base for TestCase and TestCase is really a patch

Re: test cannot find assertContains

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 23:04 -0800, Mike Ramirez wrote: > > > > from django.utils import unittest > > from django.test import TestCase > > the stuff in utils.unittest is unittest2 stuff if you're using python > <2.7 > (unittest2 is part of 2.7 now as unittest). I am using 2.6, but according to

Re: test cannot find assertContains

2011-03-11 Thread Mike Ramirez
On Friday, March 11, 2011 11:11:21 pm Kenneth Gonsalves wrote: > On Fri, 2011-03-11 at 23:04 -0800, Mike Ramirez wrote: > > > from django.utils import unittest > > > > from django.test import TestCase > > > > the stuff in utils.unittest is unittest2 stuff if you're using python > > <2.7 > > (unit

Re: test cannot find assertContains

2011-03-11 Thread Mike Ramirez
On Friday, March 11, 2011 11:21:02 pm you wrote: > The problem here is that assertContains is not part of unittest/unittest2. > > It's defined in TransactionTestCase in django.test, which extends > unittest2.TestCase and adds in assertContains, assertNotContains, > assetFormError, basically django

Re: test cannot find assertContains

2011-03-11 Thread Kenneth Gonsalves
On Fri, 2011-03-11 at 23:23 -0800, Mike Ramirez wrote: > On Friday, March 11, 2011 11:21:02 pm you wrote: > > The problem here is that assertContains is not part of > unittest/unittest2. > > > > It's defined in TransactionTestCase in django.test, which extends > > unittest2.TestCase and adds in as