Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Django - Framework do Tworzenia Aplikacjii Webo...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Marcin Mierzejewski
February 22, 2008
Programming
81
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Django - Framework do Tworzenia Aplikacjii Webowych
Prezentacja była zaprezentowana na PyCon Kraków (PyKonik)
Marcin Mierzejewski
February 22, 2008
More Decks by Marcin Mierzejewski
See All by Marcin Mierzejewski
Kup pan cegłe... Kup Pan cegłę, czyli wstęp do algorytmów rekomendacyjnych
mrmierzejewski
1
160
Python i Orange - wstep do eksploracji danych (data mining)
mrmierzejewski
1
670
Python i Django - szybkie i łatwe tworzenie aplikacji webowych
mrmierzejewski
0
580
Introduction to Django 1.0
mrmierzejewski
1
150
Other Decks in Programming
See All in Programming
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
200
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
380
sbt 2.0: takeoff
eed3si9n
0
130
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
3
4.4k
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
360
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
150
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
400
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
330
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
550
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
560
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
300
Git: the NoSQL Database
bkeepers
PRO
433
67k
How to train your dragon (web standard)
notwaldorf
96
6.9k
The browser strikes back
jonoalderson
0
1.8k
Optimising Largest Contentful Paint
csswizardry
37
4k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.3k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Marketing to machines
jonoalderson
1
5.9k
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