开发者

How to shift the django admin features to front end

I am making an application in django and python. But i have only one user and its for my personal use.

So I am confused between front end and backend because all will be doing al CRUD operation on Classes. So for me evryting will be on frontend , no backend.

But all CRUD operations are done in backend. so is there any way tos shift C开发者_JS百科RUD functionality to fron end , so that i don't have to create forms for CRUD operations


You still need some code for the list views, pagination, etc., but most of the CRUD basic logic can be done using ModelForms.

Example:

from django.forms import ModelForm

class ArticleForm(ModelForm):
    class Meta:
        model = Article

Now this form contains all the fields of your Article model; If you pass the form a instance you can edit a existing model instance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜