Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some good beginner’s guides to web development with frameworks (particularly Django)? [closed]

Tags:

python

django

I have been wanting to do some web based development project. Basically, I want to learn it. I want to basically run, how to create my own site with a backend database and stuff. For example, as most of you might have seen the movie by now, how "Facebook" was made from scratch- it is sort of a web development project.

I want to learn it from the very basic I don't know any head or toe out of this stuff, How to make a site, how to make a mail site (if that is possible, someone answer this one please!) and so on.

I am generally good at logic behind programming, hence my idea to learn this kind of stuff too. I am quite good with python. I do not know classes though.

I have setup a Django server. I am looking for some easy guides and tutorials that can help me work my way through because I am sort of noobish to this stuff.

The Django Book which was the most recommended book, when I searched online for help, wasn't a bit clear. I need something more for dummies to web development!

Any good online tutorials, books etc. any help otherwise is much appreciated!

like image 715
Sylar Avatar asked May 12 '11 16:05

Sylar


People also ask

Is Django good for beginners?

First of all, Django is a framework based on Python for building web sites and web applications. Since Django is built on top of Python, I think it's ideal for beginners. Python is the number one language I always recommend for beginners who wants to start programming.

What should I learn with Django?

You don't need to learn everything in Python but at least make your fundamental concepts clear in Python to start with the Django application. Focus especially on classes and object-oriented programming in Python. It will be easier for you to dive into Django if the fundamentals are clear to you.

What is Django framework used for?

What is Django? Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. Built by experienced developers, Django takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.

Is Django part of Python?

Django is an extremely popular and fully featured server-side web framework, written in Python. This module shows you why Django is one of the most popular web server frameworks, how to set up a development environment, and how to start using it to create your own web applications.


1 Answers

My recommendation is to start very simple. Think of a small app you might find useful, or you'd just like to make, say a contact manager.

Step one is to get your Django dev server running. After that you need to have an understanding of what MVT (model, view, template) is, and what it means to how your site/app functions. The Django docs talk about what model view and template is, and it's important to understand those.

To outline it very basically, your model is a description of your data. Django will take this model and make your database for you, and it will know how to enforce basic rules about your data from this file.

Your View is where all your processing logic goes. You'll pull model instances from the database, select which template to use and pass the data you need into your template.

Your template is what gets rendered to the screen. It takes your data from the view and inserts it into the html then sends it off to the browser.

When you understand MVT, you can then think about designing your app. When you're learning, it's often best to do this on paper, as it forces you to think a little bit more about you app. Figure out what you need it to do and write it down. This will become a "feature set" for your app.

Once you know what you want your app to do, you can work out what information will need to be stored in the database. You then want to design your models (again, on paper). It will be helpful to have Django's model field documentation open so you know what your options are for field types.

When you're happy with the models you've designed, you should create your first app in your Django code, and create your models in the apps models.py. Treat an 'App' as a module of your site that encompasses a specific set of related functions or activities. In the beginning your simple sites might only have one app, but bigger sites could have 10s or hundreds of apps.

When you've got your models set up, you'll need to create the database using syncdb. After your database has been set up you can work on creating the Django admin section where you can edit your models.

At this point you should have a very simple and functional web app for yourself. To get from start to end you'll probably need to google various topics (like, how to set up the django admin site, for example), but that is one of the most important parts of learning how to develop websites...learning how to google for good quality answers. You'll turn up a bunch of good information by searching Stackoverflow for specific topics, too.

Hopefully this can function as a good starting point for you. It takes a lot of work, research, reading and planning, but it's worth it. It's better to learn this way than with a one-shot tutorial that shows you everything without you having to figure anything out yourself.

One last thing to keep in mind, is most of the published books on Django are at least a point version behind. Django 1.3 is current, and some books are written for pre Django 1.0 and they just won't work well for you at all.

like image 113
Alex Jillard Avatar answered Oct 08 '22 07:10

Alex Jillard