Задать вопрос

Тел: +7 965 3737 888

530

Просмотров

0

Ответов

URL models

<p>You can use UrlModel to provide URL functionality to any instance of any model and any language (language support can be removed from this). Each model must have own view method, that returns HttpResponse. I was inspired by Flatpages. It is useful for small sites and static pages.</p>
`class Page(UrlModel):
    text = models.TextField()

    def view(self, request)
        # do something here
        return HttpResponse(...)`

Вопрос полезен? Да0/Нет0
file_2580.py(1.6Кб)
None