This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #258 from echocat/develop
backmerge for release 6.0.0
- Loading branch information
Showing
29 changed files
with
1,273 additions
and
681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sys | ||
sys.path.append('/opt/graphite/webapp') | ||
from django.contrib.auth.models import User | ||
from graphite.account.models import Profile | ||
from graphite.logger import log | ||
try: | ||
defaultUser = User.objects.get(username='default') | ||
except User.DoesNotExist: | ||
randomPassword = User.objects.make_random_password(length=16) | ||
defaultUser = User.objects.create_user('default','[email protected]',randomPassword) | ||
defaultUser.save() | ||
|
||
try: | ||
defaultProfile = Profile.objects.get(user=defaultUser) | ||
except Profile.DoesNotExist: | ||
defaultProfile = Profile(user=defaultUser) | ||
defaultProfile.save() | ||
|
Oops, something went wrong.