TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: importd – d is for django

116 pointsby amituover 12 years ago

11 comments

samwillisover 12 years ago
This is good although I think it has a little to much magic for me. Everything seems to happen just by using different arguments to the 'd' function, even the settings. I think its a good idea though! It would be awesome if Django had a built in way of doing single file apps.<p>Simon Willison (one of the Django core devs) made a Django micro framework a few years ago, I don't think its been developed much recently though.<p><a href="http://simonwillison.net/2009/May/19/djng/" rel="nofollow">http://simonwillison.net/2009/May/19/djng/</a><p><a href="http://news.ycombinator.com/item?id=615891" rel="nofollow">http://news.ycombinator.com/item?id=615891</a><p>-<p>EDIT:<p>Simons website seems to be down, an overview of Djing is here: <a href="https://github.com/simonw/djng" rel="nofollow">https://github.com/simonw/djng</a>
评论 #5251671 未加载
评论 #5251708 未加载
评论 #5251608 未加载
评论 #5252249 未加载
amituover 12 years ago
Hey, I am the author of the module, as well as that of smarturls and fhurl mentioned there.<p>I understand the concern about magic, and moving parts. I guess the right answer to that concern would be unittests, that I am in the process or writing.<p>I hope you enjoy the module as much as I do :-)
评论 #5252243 未加载
teiloover 12 years ago
This is a great tool for API prototyping and testing.<p>However, I wouldn't use it for a full-blown app. It's like using Flask. You could do it in a single file, but it rarely makes sense to do so. By the time you organize your code, you end up with a basic MVC app structure anyway.<p>Relocateable by default is nice. But it's pretty simple in Django to design your settings file to be path-relative.
davidwtbuxtonover 12 years ago
Related: django-mini, a command-line tool for running Django management commands without a full settings.py.<p><a href="https://github.com/davidwtbuxton/django-mini" rel="nofollow">https://github.com/davidwtbuxton/django-mini</a><p>I wrote it to make it easier to run tests for plug-able Django apps.
_neilover 12 years ago
The 'jango' is silent? I'll see myself out.
评论 #5255096 未加载
robertfwover 12 years ago
the resulting view ends up looking at lot like it would in flask [1]. I would be worried about the number of moving parts that are in play.<p>[1] <a href="http://flask.pocoo.org/" rel="nofollow">http://flask.pocoo.org/</a>
评论 #5254177 未加载
IgorPartolaover 12 years ago
So this is really cool to get started with, but I would worry that when you need to start taking advantage of various abstractions that Django provides, you'd end up having to do a huge refactor. Not that Django's abstractions are perfect, but if your app starts out living in a single file, you are more likely than not going to need to do some modularization at some point.
评论 #5252225 未加载
benjamincburnsover 12 years ago
As others have said, this looks really useful for proof of concept/prototyping work. The first use case that came to mind was hackathons, actually.<p>It'd be really nice if there was a fast, automated way to "unwrap" the microframework version of your webapp into the full-blown django project so that you can start hardening things for production in a single command.
ranedkover 12 years ago
This is pretty cool. Makes stuff much more manageable.
dgulinoover 12 years ago
fyi: This requires django 1.4. I ran w/1.3.1 and got this error when running the helloworld example:<p>ImportError: No module named wsgi<p>I updated to 1.4.5 and it worked fine.
tlarkworthyover 12 years ago
What kind of sorcery is this?