Re: Loading fixtures from views

2008-01-22 Thread Russell Keith-Magee
On Jan 23, 2008 6:39 AM, Ariel Mauricio Nunez Gomez <[EMAIL PROTECTED]> wrote: > Russ, > > Thanks for the solution you suggested, I am about to implement it, but > something came to my mind: how would I know if the fixture loading was > successful or failed? I know it writes to the standard error

Re: Loading fixtures from views

2008-01-22 Thread Ariel Mauricio Nunez Gomez
Russ, Thanks for the solution you suggested, I am about to implement it, but something came to my mind: how would I know if the fixture loading was successful or failed? I know it writes to the standard error output the result if I set verbosity higher, but it would be nicer if an exception was ra

Re: Loading fixtures from views

2008-01-22 Thread [EMAIL PROTECTED]
Thank you, Alex. Your response was very helpful. On Jan 20, 12:21 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Try this code: > > from django.core.management.commands.loaddata import Command > > def my_view( request, fixture_label1, fixture_label2 ) > Command().handle( fixture_label1, fixt

Re: Loading fixtures from views

2008-01-22 Thread [EMAIL PROTECTED]
This works. Thank you. On Jan 20, 11:33 am, Jonathan Buchanan <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > To support testing (using Selenium), I would like to invoke fixtures > > from regular Django views. More generally, I want to be able to > > perform test setup and teardown o

Re: Loading fixtures from views

2008-01-20 Thread Russell Keith-Magee
2008/1/21 Alex Koshelev <[EMAIL PROTECTED]>: > > Try this code: > > from django.core.management.commands.loaddata import Command > > def my_view( request, fixture_label1, fixture_label2 ) > Command().handle( fixture_label1, fixture_label2 ) > #... While this will probably work, but the ge

Re: Loading fixtures from views

2008-01-20 Thread Alex Koshelev
Try this code: from django.core.management.commands.loaddata import Command def my_view( request, fixture_label1, fixture_label2 ) Command().handle( fixture_label1, fixture_label2 ) #... On 20 янв, 20:04, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > To support testing (using Seleniu

Re: Loading fixtures from views

2008-01-20 Thread Jonathan Buchanan
[EMAIL PROTECTED] wrote: > To support testing (using Selenium), I would like to invoke fixtures > from regular Django views. More generally, I want to be able to > perform test setup and teardown operations from Selenium which > interacts with the application through http. > > I know that fixtu

Loading fixtures from views

2008-01-20 Thread [EMAIL PROTECTED]
To support testing (using Selenium), I would like to invoke fixtures from regular Django views. More generally, I want to be able to perform test setup and teardown operations from Selenium which interacts with the application through http. I know that fixtures are normally part of Django tests