本文整理汇总了Python中models.Project.project_id方法的典型用法代码示例。如果您正苦于以下问题:Python Project.project_id方法的具体用法?Python Project.project_id怎么用?Python Project.project_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Project
的用法示例。
在下文中一共展示了Project.project_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post_project
# 需要导入模块: from models import Project [as 别名]
# 或者: from models.Project import project_id [as 别名]
def post_project(request):
if request.method == 'POST':
form = ProjectForm(request.POST, request.FILES)
if form.is_valid():
m = Project()
m.project_id = form.cleaned_data['projectid']
m.project_name = form.cleaned_data['projectname']
m.client_name = form.cleaned_data['clientname']
m.deadline = form.cleaned_data['deadline']
#TODO: needs a fixin'
m.project_type = 1
m.poster = form.cleaned_data['poster']
m.save()
#TODO: dont redirect here send through ajax
return render(request, 'index.html', {'STATIC_URL': settings.STATIC_URL})
print form.errors