Hi guys,
is there any way to drop into a Python shell on the command line with all
relevant models loaded for a specific app? I'm searching for something similar
like the admin interface shell or django's db shell.
--
Mit freundlichen Grüßen,
Sascha Peilicke
http://saschpe.wordpress.com
1:24:09 PM UTC-5, saschpe wrote:
Hi guys,
is there any way to drop into a Python shell on the command line with all
relevant models loaded for a specific app? I'm searching for something
similar
like the admin interface shell or django's db shell.
--
Mit freundlichen Grüßen,
Sascha
')
And assume I got some tags:
TAGS = ['nice','great','awesome']
So, how's the most appropriate way in getting those tags into the table?
--
Mit freundlichen Grüßen,
Sascha Peilicke
http://saschpe.wordpress.com
signature.asc
Description: This is a digitally signed message part.
On Friday 11 February 2011 03:10:01 Bruno Rocha wrote:
Forget my last example,
This is the working code:
[ db.tag.insert(name=t) for t in TAGS if db(db.tag).count() = len(TAGS) ]
The code that @vinicius posted works prefectly too
Thank you guys!
--
Mit freundlichen Grüßen,
Sascha
in some
successful deployment scenarios for bigger sites.
--
Mit freundlichen Grüßen,
Sascha Peilicke
http://saschpe.wordpress.com
signature.asc
Description: This is a digitally signed message part.
5 matches
Mail list logo