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
b2f331dc
Kaydet (Commit)
b2f331dc
authored
Şub 22, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated tutorial to use explicit relative imports.
üst
ff5e47e7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
17 deletions
+24
-17
tutorial02.txt
docs/intro/tutorial02.txt
+12
-6
tutorial03.txt
docs/intro/tutorial03.txt
+7
-7
tutorial04.txt
docs/intro/tutorial04.txt
+3
-3
tutorial05.txt
docs/intro/tutorial05.txt
+2
-1
No files found.
docs/intro/tutorial02.txt
Dosyayı görüntüle @
b2f331dc
...
...
@@ -113,7 +113,8 @@ file, and edit it to look like this:
:filename: polls/admin.py
from django.contrib import admin
from polls.models import Question
from .models import Question
admin.site.register(Question)
...
...
@@ -193,7 +194,8 @@ the ``admin.site.register(Question)`` line with:
:filename: polls/admin.py
from django.contrib import admin
from polls.models import Question
from .models import Question
class QuestionAdmin(admin.ModelAdmin):
...
...
@@ -221,7 +223,8 @@ up into fieldsets:
:filename: polls/admin.py
from django.contrib import admin
from polls.models import Question
from .models import Question
class QuestionAdmin(admin.ModelAdmin):
...
...
@@ -248,7 +251,8 @@ aren't commonly used:
:filename: polls/admin.py
from django.contrib import admin
from polls.models import Question
from .models import Question
class QuestionAdmin(admin.ModelAdmin):
...
...
@@ -277,7 +281,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, Question
from .models import Choice, Question
# ...
admin.site.register(Choice)
...
...
@@ -310,7 +315,8 @@ registration code to read:
:filename: polls/admin.py
from django.contrib import admin
from polls.models import Choice, Question
from .models import Choice, Question
class ChoiceInline(admin.StackedInline):
...
...
docs/intro/tutorial03.txt
Dosyayı görüntüle @
b2f331dc
...
...
@@ -94,7 +94,7 @@ In the ``polls/urls.py`` file include the following code:
from django.conf.urls import url
from
polls
import views
from
.
import views
urlpatterns = [
url(r'^$', views.index, name='index'),
...
...
@@ -209,7 +209,7 @@ Wire these new views into the ``polls.urls`` module by adding the following
from django.conf.urls import url
from
polls
import views
from
.
import views
urlpatterns = [
# ex: /polls/
...
...
@@ -296,7 +296,7 @@ commas, according to publication date:
from django.http import HttpResponse
from
polls
.models import Question
from .models import Question
def index(request):
...
...
@@ -374,7 +374,7 @@ Now let's update our ``index`` view in ``polls/views.py`` to use the template:
from django.http import HttpResponse
from django.template import RequestContext, loader
from
polls
.models import Question
from .models import Question
def index(request):
...
...
@@ -406,7 +406,7 @@ rewritten:
from django.shortcuts import render
from
polls
.models import Question
from .models import Question
def index(request):
...
...
@@ -436,7 +436,7 @@ for a given poll. Here's the view:
from django.http import Http404
from django.shortcuts import render
from
polls
.models import Question
from .models import Question
# ...
def detail(request, question_id):
try:
...
...
@@ -471,7 +471,7 @@ provides a shortcut. Here's the ``detail()`` view, rewritten:
from django.shortcuts import get_object_or_404, render
from
polls
.models import Question
from .models import Question
# ...
def detail(request, question_id):
question = get_object_or_404(Question, pk=question_id)
...
...
docs/intro/tutorial04.txt
Dosyayı görüntüle @
b2f331dc
...
...
@@ -73,7 +73,7 @@ create a real version. Add the following to ``polls/views.py``:
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from
polls
.models import Choice, Question
from .models import Choice, Question
# ...
def vote(request, question_id):
p = get_object_or_404(Question, pk=question_id)
...
...
@@ -225,7 +225,7 @@ First, open the ``polls/urls.py`` URLconf and change it like so:
from django.conf.urls import url
from
polls
import views
from
.
import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
...
...
@@ -254,7 +254,7 @@ views and use Django's generic views instead. To do so, open the
from django.core.urlresolvers import reverse
from django.views import generic
from
polls
.models import Choice, Question
from .models import Choice, Question
class IndexView(generic.ListView):
...
...
docs/intro/tutorial05.txt
Dosyayı görüntüle @
b2f331dc
...
...
@@ -170,7 +170,8 @@ Put the following in the ``tests.py`` file in the ``polls`` application:
from django.utils import timezone
from django.test import TestCase
from polls.models import Question
from .models import Question
class QuestionMethodTests(TestCase):
...
...
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