Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
62b2c010
Commit
62b2c010
authored
May 17, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3fafce07
b7a1085f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
21 deletions
+20
-21
appliance/initial_data.json
appliance/initial_data.json
+0
-20
appliance/weblate
appliance/weblate
+1
-1
docs/management.rst
docs/management.rst
+4
-0
weblate/accounts/management/commands/createadmin.py
weblate/accounts/management/commands/createadmin.py
+15
-0
No files found.
appliance/initial_data.json
deleted
100644 → 0
View file @
3fafce07
[
{
"pk"
:
1
,
"model"
:
"auth.user"
,
"fields"
:
{
"username"
:
"admin"
,
"first_name"
:
"Weblate"
,
"last_name"
:
"Admin"
,
"is_active"
:
true
,
"is_superuser"
:
true
,
"is_staff"
:
true
,
"last_login"
:
"2008-08-08 08:08:08"
,
"groups"
:
[],
"user_permissions"
:
[],
"password"
:
"pbkdf2_sha256$10000$9a7nZeMi9y2x$Ugj6Vcz+irT4nFC9H9D1oePw3RA42oLSYAYpufrfcpw="
,
"email"
:
"admin@image.weblate.org"
,
"date_joined"
:
"2008-08-08 08:08:08"
}
}
]
appliance/weblate
View file @
62b2c010
...
...
@@ -24,7 +24,7 @@ case "$1" in
su - wwwrun
-s
/bin/bash
-c
'/usr/share/weblate/manage.py syncdb --noinput'
rc_status
-v
-r
echo
'Adding admin user for Weblate'
su - wwwrun
-s
/bin/bash
-c
'/usr/share/weblate/manage.py
loaddata /usr/share/weblate/initial_data.jso
n'
su - wwwrun
-s
/bin/bash
-c
'/usr/share/weblate/manage.py
createadmi
n'
rc_status
-v
-r
touch
/var/lib/weblate/setup
...
...
docs/management.rst
View file @
62b2c010
...
...
@@ -23,6 +23,10 @@ The ./manage.py is extended with following commands:
Cleanups orphnaed checks and translation suggestions.
.. option:: createadmin
Creates admin account with pasword admin.
.. option:: loadpo
Reloads translations from disk (eg. in case you did some updates in Git
...
...
weblate/accounts/management/commands/createadmin.py
0 → 100644
View file @
62b2c010
from
django.core.management.base
import
BaseCommand
from
optparse
import
make_option
from
django.contrib.auth.models
import
User
class
Command
(
BaseCommand
):
help
=
'setups admin user with admin password (INSECURE!)'
def
handle
(
self
,
*
args
,
**
options
):
user
=
User
.
objects
.
create_user
(
'admin'
,
'admin@example.com'
,
'admin'
)
user
.
first_name
=
'Weblate'
user
.
last_name
=
'Admin'
user
.
is_superuser
=
True
user
.
is_staff
=
True
user
.
is_active
=
True
user
.
save
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment