Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
e075d2e6
Kaydet (Commit)
e075d2e6
authored
Agu 02, 2014
tarafından
Collin Anderson
Kaydeden (comit)
Erik Romijn
Agu 02, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #23148 -- Minor tweaks in tutorial code samples
üst
8f9d6e83
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
+13
-7
reusable-apps.txt
docs/intro/reusable-apps.txt
+3
-0
tutorial01.txt
docs/intro/tutorial01.txt
+4
-1
tutorial02.txt
docs/intro/tutorial02.txt
+3
-4
tutorial03.txt
docs/intro/tutorial03.txt
+2
-2
tutorial04.txt
docs/intro/tutorial04.txt
+1
-0
No files found.
docs/intro/reusable-apps.txt
Dosyayı görüntüle @
e075d2e6
...
...
@@ -66,6 +66,9 @@ After the previous tutorials, our project should look like this::
polls/
__init__.py
admin.py
migrations/
__init__.py
0001_initial.py
models.py
static/
polls/
...
...
docs/intro/tutorial01.txt
Dosyayı görüntüle @
e075d2e6
...
...
@@ -704,8 +704,11 @@ demonstration:
:filename: polls/models.py
import datetime
from django.db import models
from django.utils import timezone
# ...
class Question(models.Model):
# ...
def was_published_recently(self):
...
...
docs/intro/tutorial02.txt
Dosyayı görüntüle @
e075d2e6
...
...
@@ -275,8 +275,8 @@ with the admin just as we did with ``Question``. That's easy:
:filename: polls/admin.py
from django.contrib import admin
from polls.models import Choice
from polls.models import Choice
, Question
# ...
admin.site.register(Choice)
Now "Choices" is an available option in the Django admin. The "Add choice" form
...
...
@@ -319,8 +319,7 @@ registration code to read:
class QuestionAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question_text']}),
('Date information', {'fields': ['pub_date'],
'classes': ['collapse']}),
('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),
]
inlines = [ChoiceInline]
...
...
docs/intro/tutorial03.txt
Dosyayı görüntüle @
e075d2e6
...
...
@@ -97,7 +97,7 @@ In the ``polls/urls.py`` file include the following code:
from polls import views
urlpatterns = [
url(r'^$', views.index, name='index')
url(r'^$', views.index, name='index')
,
]
The next step is to point the root URLconf at the ``polls.urls`` module. In
...
...
@@ -466,7 +466,7 @@ provides a shortcut. Here's the ``detail()`` view, rewritten:
.. snippet::
:filename: polls/views.py
from django.shortcuts import
render, get_object_or_404
from django.shortcuts import
get_object_or_404, render
from polls.models import Question
# ...
...
...
docs/intro/tutorial04.txt
Dosyayı görüntüle @
e075d2e6
...
...
@@ -72,6 +72,7 @@ create a real version. Add the following to ``polls/views.py``:
from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from polls.models import Choice, Question
# ...
def vote(request, question_id):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment