Alexander Popelnukhin avatar Alexander Popelnukhin committed 84a133d

Rename to kiwitest

Comments (0)

Files changed (9)

 
 
 AUTHENTICATION_BACKENDS = (
-    'KiwiTest.auth_backends.EmailBackend',
+    'kiwitest.auth_backends.EmailBackend',
 )
 
 # Additional locations of static files
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
-    'KiwiTest.middlewares.SQLLogMiddleware',
+    'kiwitest.middlewares.SQLLogMiddleware',
 )
 
-ROOT_URLCONF = 'KiwiTest.urls'
+ROOT_URLCONF = 'kiwitest.urls'
 
 TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.auth',
     'django.core.context_processors.debug',
     'django.core.context_processors.i18n',
     'django.core.context_processors.request',
-    'KiwiTest.context_processors.settings_processor',
+    'kiwitest.context_processors.settings_processor',
 )
 
 TEMPLATE_DIRS = (
     'django.contrib.admin',
     # Uncomment the next line to enable admin documentation:
     # 'django.contrib.admindocs',
-    'KiwiTest.students',
+    'kiwitest.students',
 )
 
 # A sample logging configuration. The only tangible logging

students/admin.py

 from django.contrib import admin
 
-from KiwiTest.students.models import Student, Group, Log
+from kiwitest.students.models import Student, Group, Log
 
 class StudentInline(admin.TabularInline):
     model = Student

students/forms.py

 #!-*-coding: utf-8-*-
 from django.forms import ModelForm, DateField, BooleanField, Form, RadioSelect
-from KiwiTest.students.models import Student, Group
+from kiwitest.students.models import Student, Group
 
 class StudentForm(ModelForm):
     birthday = DateField(help_text=u'Например: 1687-03-24', label=u'Дата рождения')

students/management/commands/showgroups.py

     help = "Show groups and count students in it"
 
     def handle(self, *args, **options):
-        from KiwiTest.students.models import Group
+        from kiwitest.students.models import Group
         groups = Group.objects.all()
 
         for group in groups:

students/tests.py

 from django.test import TestCase
 from django.test import Client
 from django.contrib.auth.models import User
-from KiwiTest.students.models import Group, Student
+from kiwitest.students.models import Group, Student
 
 class AddRemoveObjects(TestCase):
 
 from django.conf.urls.defaults import patterns, include, url
 
-urlpatterns = patterns( 'KiwiTest.students.views',
+urlpatterns = patterns('kiwitest.students.views',
     url(r'^$', 'index', name='index'),
     url(r'^group/(\d+)/$', 'group', name='show_group'),
 

students/views.py

 from django.contrib.auth.decorators import login_required
 from django.http import Http404
 
-from KiwiTest.students.models import Group, Student
-from KiwiTest.students.forms import StudentForm, GroupForm, YesNoForm
+from kiwitest.students.models import Group, Student
+from kiwitest.students.forms import StudentForm, GroupForm, YesNoForm
 
 def index(request):
     groups = Group.objects.all()

templates/login.html

 {% block auth %}{% endblock %}
 
 {% block content %}
-    <a href="{% url 'KiwiTest.students.views.index' %}">В начало</a>
+    <a href="{% url 'kiwitest.students.views.index' %}">В начало</a>
     <h1>Вход</h1>
     {% if form.errors %}
         <p>Your username and password didn't match. Please try again.</p>
 admin.autodiscover()
 
 urlpatterns = patterns('',
-    url(r'', include('KiwiTest.students.urls')),
+    url(r'', include('kiwitest.students.urls')),
 
     (r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
     (r'^logout/$', 'django.contrib.auth.views.logout_then_login', {'login_url': '/login/'}),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.