I recently delivered a talk on the topic Introduction to Web development and Django at 5 Day Industrial training programme on Free Software organized by Free Software Foundation Tamil Nadu. This is the presentation I created and used for the talk, which is created using HTML5 and reveal.js.
20. In these process of Input - Processing - Output for an Web
Application there are number of Web pages involved
and that is why I said
Web Apps are more than a collection of Web Pages.Web Apps are more than a collection of Web Pages.
21. How can we build WebHow can we build Web
Applications?Applications?
1. Server - Serve files.
2. Web Framework - handle Web requests
3. Server side scripting - generate contents dynamically
22. Here comes our Show stopper...
The Web Framework for Perfectionists with
Deadlines.
23. Django is a Web-FrameworkDjango is a Web-Framework
built upon Python
24. Web frameworks makes development
Organized, Structured & FasterOrganized, Structured & Faster
31. $ python manage.py startapp app_name
This will also create a number of files inside a folder 'app_name'.
This command should be executed into the Project directory that
we created previously.
33. Sample Code - ModelSample Code - Model
# File Name - models.py
from django.db import models
class User(models.Model):
name = Model.CharField(max_length=20)
email = Model.CharField(unique=True)
34. Sample Code - ViewSample Code - View
# File Name - views.py
from django.shortcuts import render
from django.models import User
def index(request):
users = User.objects.all()
context = {'users': users}
return render(request,'index.html',context)
43. < Any Questions? >< Any Questions? >
Email: prasmailme@gmail.com
Twitter: @imprashere
http://impras.in
MTV Image Credit:
Thank YouThank You
Little Green River blog