Added a small project starting script #355

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
5 participants

Basically, sets up a small directory structure for most projects, gives you a gitignore file, index template, main application file.

Poincare commented Dec 4, 2011

any comments on this?

lueo commented Dec 7, 2011

I saw a interesting project that using Paster to generate flask site. How about add an official Paster template of flask?
https://bitbucket.org/danjac/flask-kickstart/overview

Poincare commented Dec 7, 2011

But, that shouldn't be added into mainline.

@plaes plaes commented on the diff Dec 9, 2011

scripts/flask_start.py
+myapp/
+---- .gitignore
+---- templates/
+ --- index.html
+---- static/
+ ---- index.css
+---- myapp.py"""
+
+import os
+import sys
+
+def create_app_dir(appname):
+ if not os.path.isdir(appname):
+ os.makedirs(appname)
+
+ f = open(appname + "/" + appname + ".py", "w+")
@plaes

plaes Dec 9, 2011

Contributor

use os.path.join(appname, "%s.py" % appname, 'w+')

Also similar issues below...

@plaes plaes commented on the diff Dec 9, 2011

scripts/flask_start.py
+---- .gitignore
+---- templates/
+ --- index.html
+---- static/
+ ---- index.css
+---- myapp.py"""
+
+import os
+import sys
+
+def create_app_dir(appname):
+ if not os.path.isdir(appname):
+ os.makedirs(appname)
+
+ f = open(appname + "/" + appname + ".py", "w+")
+ f = open(appname + "/.gitignore", "w+")
@plaes

plaes Dec 9, 2011

Contributor

What about people who use bzr, svn, cvs? :)

Poincare commented Dec 9, 2011

For the first comment, I'll modify the code to use it, thanks.

And, for the second, you can do --git to execute the git code, I guess.

I'm not sure if I understand it fully, but, I don't think its related...

Owner

mitsuhiko commented Jan 4, 2012

This is more something for a separate project (maybe a flask extension?) than flask itself. But maybe I will change my mind later on, but certainly not now :-)

mitsuhiko closed this Jan 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment