It is in the manual. We just do not call this "fixtures"
python web2py.py -S app -M
>>> db.export_to_csv_file(open('dump','w'))
rm applications/app/databases/*
python web2py.py -S app -M
>>> db.import_from_csv_file(open('dump'))
>>> db.commit()
Done.
On Tuesday, 14 January 2014 01:21:47 UTC-6, User wrote:
>
> I have the same question. Is there any update on this almost 2 years
> later?
>
> On Thursday, March 8, 2012 4:32:45 PM UTC-5, Bruce Wade wrote:
>>
>> Hi,
>>
>> I have seen lots of postings about people wanting to pre-load data
>> (fixtures) in web2py. However I have never found a standard solution.
>>
>> What are the best practices? Also before someone suggests putting them in
>> the models directory I don't think that is a good idea. I would prefer
>> something more like django where we can run a command to load the fixtures
>> whenever we want.
>>
>> IE:
>> python web2py.py -f fixtures_path or file
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.warplydesigned.com
>> http://www.fitnessfriendsfinder.com
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.