top | item 3687515

Create a blog in 30 mins with Django 1.3 (Screencast)

47 points| arocks | 14 years ago |arunrocks.com | reply

11 comments

order
[+] drostie|14 years ago|reply
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?

[+] roam|14 years ago|reply
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.

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
Try Flask (python web "microframework"), the library approach is pretty close to what you're describing, although not so high level.
[+] zalew|14 years ago|reply
> sitting here navigating through these massive config files -- and you even need Django's bundled applications to make those files in the first place.

what do you mean??

[+] IgorPartola|14 years ago|reply
You do the configuration once in your life. Then you can just copy your basic template between projects that suits yours style.
[+] damncabbage|14 years ago|reply
I am saddened that this video is not punctuated by the narrator yelling "Whups!" every fifteen seconds.
[+] christiangenco|14 years ago|reply
Didn't the rails "make a blog" video do it in 15 minutes?
[+] namsral|14 years ago|reply
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.

[+] danso|14 years ago|reply
Blogs are like the "Hello World" of dynamic web apps. No one is implying that this is where web dev ends at.