本文整理匯總了Python中models.Project.monthlygoal方法的典型用法代碼示例。如果您正苦於以下問題:Python Project.monthlygoal方法的具體用法?Python Project.monthlygoal怎麽用?Python Project.monthlygoal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models.Project
的用法示例。
在下文中一共展示了Project.monthlygoal方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: newProject
# 需要導入模塊: from models import Project [as 別名]
# 或者: from models.Project import monthlygoal [as 別名]
def newProject(request, projectname, monthlygoal):
print projectname
project = Project()
project.user = request.user
project.name = projectname
if monthlygoal != "":
project.monthlygoal = int(monthlygoal)
goal = project.monthlygoal
else:
goal = "-"
print project
project.save()
print "qwe"
dajax = Dajax()
dajax.remove("#newrow")
row = """<tr id="project{0}">
<td>{1}</td>
<td>{2}</td>
<td>0</td>
<td><a href="javascript:void(0)" onClick="Dajaxice.timemanager.removeProject(removeRow, {{'project': '{0}'}});" class="remove"><i class="icon-remove pull-right"></i></a> <a href="javascript:void(0)" onClick="" class="edit"><i class="icon-pencil pull-right"></i></a></td>
</tr>""".format(project.id, projectname, goal)
print row
dajax.append("#projecttable", "innerHTML", row)
dajax.script("$('#newprojectbutton').show();")
return dajax.json()