本文整理汇总了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()