I always like presentations like this. I think most languages really just need screencasts where people show you, "here is how you start using this language." One of my favorites was Ryan Dahl's introduction to Node.js, which had the same general form:
https://www.youtube.com/watch?v=jo_B4LTHi3I
So thanks for that.
I still don't like Django so much, precisely because of the fact that you're sitting here navigating through these massive config files -- and you even need Django's bundled applications to make those files in the first place. Libraries seem much cleaner to me. I guess what I'm dreaming of is a version of django where this whole talk becomes a little simpler, a sort of cookie-cutter formalism where you just start writing:
#!/usr/bin/python
import django
serve = django.server(port=8080, db=('sqlite3', 'mysite.db'))
serve.url('/admin/.*', django.admin_site())
blog = serve.app(model={
"some json model": "I don't know exactly how it works"
})
serve.url('/blog/.*', blog)
...to accomplish the same thing that you're doing in this talk. I mean, it's okay that applications often get their own folder, but shouldn't they grow into that with import statements?
An open question to HN: are there libraries which do this sort of thing which I should know about?
The reason you have to start looking in settings.py and urls.py is because you used "django-admin.py startproject". Why would you do that? Probably because it provides a nice and common layout with some sensible default configuration.
No, I don't recommend you to do that. Use Flask, Bottle or any other lightweight framework/library you want to use. Just don't get hung up on how the Django docs suggests you structure your project. It's all still Python.
> sitting here navigating through these massive config files -- and you even need Django's bundled applications to make those files in the first place.
Instead of a blog a better example to showcase a web framework would be a wiki, forum or even HN.
Not bashing the OP but tutorials and screencasts like this fail at the first step by teaching the beginner a blog should be dynamically generated.
Tutorials and screencasts like this are a great resource for beginners as an introduction to a new framework. And the "blog" has been the de facto standard web app to showcase the framework. But as developers we should know that web apps like blogs should be statically generated and saying otherwise is setting a bad example to beginning programmers.
[+] [-] drostie|14 years ago|reply
I still don't like Django so much, precisely because of the fact that you're sitting here navigating through these massive config files -- and you even need Django's bundled applications to make those files in the first place. Libraries seem much cleaner to me. I guess what I'm dreaming of is a version of django where this whole talk becomes a little simpler, a sort of cookie-cutter formalism where you just start writing:
...to accomplish the same thing that you're doing in this talk. I mean, it's okay that applications often get their own folder, but shouldn't they grow into that with import statements?An open question to HN: are there libraries which do this sort of thing which I should know about?
[+] [-] roam|14 years ago|reply
But you don't have to use "startproject". Here's an example: http://olifante.blogs.com/covil/2010/04/minimal-django.html
No, I don't recommend you to do that. Use Flask, Bottle or any other lightweight framework/library you want to use. Just don't get hung up on how the Django docs suggests you structure your project. It's all still Python.
[+] [-] senko|14 years ago|reply
[+] [-] zalew|14 years ago|reply
what do you mean??
[+] [-] unknown|14 years ago|reply
[deleted]
[+] [-] IgorPartola|14 years ago|reply
[+] [-] damncabbage|14 years ago|reply
[+] [-] christiangenco|14 years ago|reply
[+] [-] RShackleford|14 years ago|reply
[deleted]
[+] [-] namsral|14 years ago|reply
Not bashing the OP but tutorials and screencasts like this fail at the first step by teaching the beginner a blog should be dynamically generated.
Tutorials and screencasts like this are a great resource for beginners as an introduction to a new framework. And the "blog" has been the de facto standard web app to showcase the framework. But as developers we should know that web apps like blogs should be statically generated and saying otherwise is setting a bad example to beginning programmers.
[+] [-] danso|14 years ago|reply