# -*- coding: utf-8 -*-g
- g надо убрать.verbose_name='Город'
verbose_name=u'Город'
def method(a, b, c=3):
return a ** c + b ** c
print(method(2, 5, 1), method(2, 5))
class Parent(object):
def method(self, a, b, c):
return a ** c + b ** c
class Child():
def method(self, a, b):
return Parent.method(a, b, 3)
(r'^accounts/', include('registration.backends.default.urls')),
from django.db.models.query import QuerySet
class LoginRequiredMixin(View):
@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
return super(LoginRequiredMixin, self).dispatch(*args, **kwargs)
class ProfileUpdateView(LoginRequiredMixin, UpdateView):
...