#7835: Provide the ability for model definitions that are only availably during testing ----------------------------------------+----------------------------------- Reporter: russellm | Owner: nobody Status: new | Milestone: Component: Testing framework | Version: SVN Resolution: | Keywords: feature test models Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ----------------------------------------+----------------------------------- Comment (by peritus <[EMAIL PROTECTED]>):
Workaround: {{{ import sys if sys.argv[1] == 'test': # This is a bit hacky, see # http://code.djangoproject.com/ticket/7835 from django.db import models class Poll(models.Model): # .. .. }}} -- Ticket URL: <http://code.djangoproject.com/ticket/7835#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---