def createFilm(self): if self.is_valid(): film = Film() film.title = self.cleaned_data.get("title") film.text = self.cleaned_data.get("about") film.photo = self.cleaned_data.get("photo") film.save() return False else: mistake = u"Форма заполнена с ошибками" return mistake
def create(title, author, date, type, image, synopsis, country): """ Create a new film """ film = Film(title=title, author=author, date=date, type=type, image=image, synopsis=synopsis, country=country) return film.save()
def create(name, year, pos, rating, url, image): film = Film( name=name, year=year, pos=pos, rating=rating, url=url, image=image, ) return film.save()
def create(title, date, author): """ Create a new film """ film = Film(title=title, date=date, author=author) return film.save()
def create(title, date): """ Create a new film """ film = Film(title=title, date=date) return film.save()