Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Django - Framework do Tworzenia Aplikacjii Webo...
Search
Marcin Mierzejewski
February 22, 2008
Programming
0
61
Django - Framework do Tworzenia Aplikacjii Webowych
Prezentacja była zaprezentowana na PyCon Kraków (PyKonik)
Marcin Mierzejewski
February 22, 2008
Tweet
Share
More Decks by Marcin Mierzejewski
See All by Marcin Mierzejewski
Kup pan cegłe... Kup Pan cegłę, czyli wstęp do algorytmów rekomendacyjnych
zenzire
1
130
Python i Orange - wstep do eksploracji danych (data mining)
zenzire
1
610
Python i Django - szybkie i łatwe tworzenie aplikacji webowych
zenzire
0
550
Introduction to Django 1.0
zenzire
1
120
Other Decks in Programming
See All in Programming
エンジニアが挑む、限界までの越境
nealle
1
320
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
140
Global Azure 2025 @ Kansai / Hyperlight
kosmosebi
0
120
The New Developer Workflow: How AI Transforms Ideas into Code
danielsogl
0
110
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
120
20250426 GDGoC 合同新歓 - GDGoC のススメ
getty708
0
110
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
800
20250429 - CNTUG Meetup #67 / DevOps Taiwan Meetup #69 - Deep Dive into Tetragon: Building Runtime Security and Observability with eBPF
tico88612
0
170
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
Lambda(Python)の リファクタリングが好きなんです
komakichi
4
240
KawaiiLT 登壇資料 キャリアとモチベーション
hiiragi
0
160
Serving TUIs over SSH with Go
caarlos0
0
600
Featured
See All Featured
Six Lessons from altMBA
skipperchong
28
3.8k
Raft: Consensus for Rubyists
vanstee
137
6.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
700
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Rails Girls Zürich Keynote
gr2m
94
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing Experiences People Love
moore
142
24k
Transcript
Marcin Mierzejewski www.mierzejewski.net
Django Framework do tworzenia aplikacji webowych
Historia 2003 - Kansas, USA 2005 - licencja BSD 2005
- wersja 0.90 2006 - wersja 0.95 2007 - wersja 0.96.1
Cechy Użytkownicy Uwierzytelnianie Formularze Admin Panel Middleware
MTV Model Template View Model - dane Template - prezentacja
View - logika
Model SQL Free ORM API
Template restrykcyjne i dziedziczenie {{ zmienne }}, {% tagi %},
filtry HTML, CSS, CSV, XML, ...
URL /news.php?id=5756 /2008/02/12/drugie-spotkanie-pykonika
Blog Lista Szczegóły Panel administracyjny Użytkownicy
Projekt # django-admin.py startproject strona strona/ __init__.py manage.py settings.py urls.py
Panel # ./manage.py syncdb # ./manage.py runserver
Aplikacja # ./manage.py startapp blog blog/ __init__.py models.py views.py
Model class Blog(models.Model): tytul = models.CharField(maxlength=250) slug = models.SlugField() tresc
= models.TextField() data = models.DateTimeField() class Admin: pass
Panel # ./manage.py syncdb # ./magage.py runserver
URL urlpatterns = patterns('', (r'^$', 'strona.blog.views.lista'), (r'^(?P<s>[A-Za-z-]+)/$', 'strona.blog.views.detale'), )
View def lista(request): blogi = Blog.objects.all() return render_to_response('lista.html', { 'blogi':
blogi }) def detale(request, s): blog = get_object_or_404(Blog, slug = s ) return render_to_response('detale.html', { 'blog': blog })
Template lista.html <h1>Blog</h1> {% for blog in blogi %} <h2>{{
blog.tytul }}</h2> <h3>{{ blog.data }}</h3> <a href='/blog/{{ blog.slug }}'>Więcej</a><br> {% endfor %}
Template detale.html <h1>{{ blog.tytul }}</h1> <h2>{{ blog.data }}</h2> {{ blog.tresc
}}
Rachunek http://127.0.0.1:8000/ /drugie-spotkanie-pykonika/
Społeczność DjangoProject.com DjangoPeople.net DjangoSnipplets.com DjangoGigs.com