9 ms·
Show HN: Pre-configured Django project, Git repo, and virtualenv with 1 command
- michaelq 14y agoAwesome tool - we used it at Startup Weekend San Diego!
- elimisteve 14y agoCongrats to your team for winning! Building a project in 54 hours is awesome... Django Project Builder took a bit longer :-D
- jimmcgaw 14y agoI have been a Django developer for a few years now. If you are like me and you start a lot of new Django projects, trust me when I say you do not have time NOT to use this. Awesome tool that helps you get up and running with an new Django project quickly. Go, now, quick...start using it.
- elimisteve 14y agoDirect link to GitHub repo: https://github.com/prototypemagic/django-projectbuilder/ https://github.com/prototypemagic/django-projectbuilder/
- hsparikh 14y agoexcited to give this a whirl this weekend.
- leetrout 14y agoI wrote a tool (along similar ideas, starting out is always a needless time sink) called GluStik (punning Paster) https://github.com/leetrout/glustik#default-djangoglu-methods https://github.com/leetrout/glustik#default-djangoglu-method... Now GluStik scratched my itch of needing a very specific, custom layout, represented in code, and plopping in Django's files (like settings) so it provides hooks to use Django's templates. I'm curious what sort of design decisions went into project builder and what plans exist to support emerging trends? For instance, I would much rather have a settings package with base.py and local.py inside where my local settings can extend base settings (like INSTALLED_APPS += ('debugtoolbar',) ala Brack3t's Modular Settings https://github.com/brack3t/django-modular-settings https://github.com/brack3t/django-modular-settings I realize this isn't the default Django behavior but I know more than a couple developers that use this format. So if project builder is about "sane defaults" and the masses prefer this is there a plan to support it (or other, similar developer centric preferences that are outside the "Django way")?
- ajvb 14y agoWe have included settings_local.py for development purposes, which gets imported by settings.py if it can be found. The main purpose for this is for the settings_local.py to be using sqlite3 rather than postgres, which is the default in settings.py. Another thing which is kind of hidden is the ptm1.4 branch. This is a branch that includes a lot more, and will be growing quickly. We wanted the master branch to be generic as possible, and have it so people can easily switch out our defaults for their own, i.e. changing any of the files in django-files/ for their specific needs. In regards to supporting other 'preferred practices', we welcome people to fork this repo and contribute stuff back. The master branch will be staying more generic, but we are all for best practices no matter if they are the "Django way".
- leetrout 14y agoYou do see the difference between importing local settings into settings.py and importing both of them from separate modules in a package's init so they can override (per my example), yes? I feel like you should take a harder look at the modular settings link I included. MUCH better way to solve this problem.
- Herbert2 14y agoThe quality of this leaves a lot to be desired* and you would be better off with using a 1.4 project from somewhere like https://github.com/xenith/django-base-template https://github.com/xenith/django-base-template. *Hardcoded ubuntu user and hardcoded py26 and py26 paths in different files: https://github.com/prototypemagic/django-projectbuilder/blob/master/server-scripts/new-virtualhost.py https://github.com/prototypemagic/django-projectbuilder/blob... https://github.com/prototypemagic/django-projectbuilder/blob/master/server-scripts/new-virtualhost-subdomain.py https://github.com/prototypemagic/django-projectbuilder/blob...
- ajvb 14y agoEven though it doesn't seem to be the case when viewing the README, this is more for automatically creating a Django app rather than the deployment process. There are things like Chef, or even Fabric, which are far more swag for auto-deployment. The core aspect of this is the Django defaults and the front-end stuff. The server scripts are in a separate folder for a reason.
- elimisteve 14y agoRelease early, release often :-). We decided to launch this as soon as we thought other people could benefit from it. That day is today. As stated in the docs, the server-side auto-deploy code assumes you're running Ubuntu. Removing such assumptions is a high priority (see TODO.md). That said, the whole "start a new pre-configured Django project with lots of stuff pre-configured" thing is ready now and only assumes you're on a Unixy OS.
- senko 14y agoOr just have a skeleton/boilerplate code in a repo and clone it for each new project. Here's mine http://github.com/senko/dj-skeletor http://github.com/senko/dj-skeletor (feat. south, debug toolbar, raven/sentry, fabric).
- mgrouchy 14y agoDjango also allows you to specify project templates https://docs.djangoproject.com/en/dev/ref/django-admin/#startproject-projectname-destination https://docs.djangoproject.com/en/dev/ref/django-admin/#star... , very useful. There is also support for app templates as well if you want to go that far.
- heretohelp 14y agoYou guys would lose your minds with envy if you saw how my company automates Flask :P
- RegEx 14y agoHave any Flask projects in the wild for us to see? The "Powered by Flask" section in the Flask docs is full of quick toy projects.
- heretohelp 14y agohttp://www.nutrivise.com/ http://www.nutrivise.com/
- jiayo 14y agoThe about link is giving me a 404.
- heretohelp 14y agoNoice, I'll go fix that now. Thanks! You get a free beta invite if you like for finding the bug.
- anthonyb 14y agoHeh. Whatever nifty location rewriting javascript you're using makes it impossible for me to browse your site - eg. http://www.nutrivise.com/#terms/ http://www.nutrivise.com/#terms/ just points to your homepage. Also: the 'terms of use' on that page are bogus. "The most advanced nutrition system [evar!!1!]" vs. "NUTRIVISE MAKES NO WARRANTIES ABOUT THE ACCURACY, RELIABILITY, COMPLETENESS, OR TIMELINESS OF THE MATERIAL OR THE WEB SITE ... WHETHER BASED ON THIRD PARTY INFORMATION OR ON RATINGS GENERATED BY NUTRIVISE." Oh? So what are people paying you for then, if not expert advice that you're willing to stand behind?
- 14y ago
- zacharyvoase 14y agoI’m really sorry to get all critical, but if you personally have to SSH into the server to do setup or deployment—especially if you have to be root—you’re doing it wrong. I also feel that if anyone or anything has to SSH into a server for deployment, it could be done better. I use Chef to automate all of this stuff; it's surprising that we have great tools like Chef, Puppet and CFEngine and people still feel the need to write custom collections of fragile scripts to get basic stuff done.
- whimsy 14y agoYou're right, I should be using these. How's the learning curve? Should I find a tutorial? Which should I choose, and why?
- meric 14y agoOf course deploying as root is doing it wrong. However, I still haven't found enough reason to switch from using SSH for deployment. It's almost always three lines. ssh; git pull; ./manage.py syncdb/migrate/collectstatic. The only hindrance has been configuring the site to work on the server for the first time, i.e what the site at this link claims to solve. I've spent several hours on fabric before but gave up when I realised I've spent more time on learning it than the time I spent deploying my code. Can you tell me what I am missing out? I'm still relatively new to django deployment and I feel I'm missing something but I haven't found it yet.
- heretohelp 14y agoIdempotence, edge-cases, compliance ensurance. What if you want to redeploy a configuration change to your web servers? What if you want to ensure such changes get re-deployed everytime a change is made to a config file?
- meric 14y agoI guess if you are deploying the same site to more than 1 production server these will become worthy problems to solve?
- mkramlich 14y agoshell scripting and templates for the win