本文整理汇总了Python中sentry.models.User.email方法的典型用法代码示例。如果您正苦于以下问题:Python User.email方法的具体用法?Python User.email怎么用?Python User.email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sentry.models.User
的用法示例。
在下文中一共展示了User.email方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configure
# 需要导入模块: from sentry.models import User [as 别名]
# 或者: from sentry.models.User import email [as 别名]
#!/srv/sentry/application/current/bin/python
{% from "sentry/map.jinja" import sentry with context %}
from sentry.utils.runner import configure
configure()
from sentry.models import Team, Project, ProjectKey, User, Organization
user = User()
user.username = '{{sentry.bootstrap.username}}'
user.email = '{{sentry.bootstrap.email}}'
user.is_superuser = True
user.set_password('{{sentry.bootstrap.password}}')
user.save()
organization = Organization()
organization.name = '{{sentry.bootstrap.organization}}'
organization.owner = user
organization.save()
team = Team()
team.organization = organization
team.name = '{{sentry.bootstrap.team}}'
team.owner = user
team.save()
project = Project()
project.organization = organization
project.team = team
project.owner = user
project.name = '{{sentry.bootstrap.project}}'
示例2: configure
# 需要导入模块: from sentry.models import User [as 别名]
# 或者: from sentry.models.User import email [as 别名]
from sentry.utils.runner import configure
configure()
from sentry.models import Team, Project, ProjectKey, User, Organization
user = User()
user.username = 'admin'
user.email = '[email protected]'
user.is_superuser = True
user.set_password('admin')
user.save()
organization = Organization()
organization.name = 'MyOrg'
organization.owner = user
organization.save()
team = Team()
team.name = 'Sentry'
team.organization = organization
team.owner = user
team.save()
project = Project()
project.team = team
project.name = 'Default'
project.organization = organization
project.save()
f = open('dsn', 'wb')
key = ProjectKey.objects.filter(project=project)[0]
示例3: configure
# 需要导入模块: from sentry.models import User [as 别名]
# 或者: from sentry.models.User import email [as 别名]
"""
# Bootstrap the Sentry environment
from sentry.models import Organization, OrganizationMember, \
OrganizationMemberTeam, Project, ProjectKey, Team, User
from sentry.utils.runner import configure
configure()
# Make an assumption that if 'admin' -User exists Sentry has been initialized
if not User.objects.filter(username='admin').exists():
user = User()
user.username = 'admin'
user.email = '[email protected]'
user.is_superuser = True
user.set_password('admin')
user.save()
organization = Organization.objects.filter(slug='sentry')[0]
team = Team()
team.name = 'COD'
team.organization = organization
team.save()
project = Project()
project.team = team
project.add_team(team)
project.name = 'Cern Open Data Portal'
示例4: configure
# 需要导入模块: from sentry.models import User [as 别名]
# 或者: from sentry.models.User import email [as 别名]
#!/usr/bin/env python
import sys
# Bootstrap the Sentry environment
from sentry.utils.runner import configure
configure()
# Add default superuser
from sentry.models import User
user = User()
user.username = sys.argv[1]
user.email = sys.argv[2]
user.is_superuser = True
user.set_password(sys.argv[3])
user.save()