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
37c4a08f
Commit
37c4a08f
authored
Jul 30, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
0087ab22
1170c99c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
appliance/weblate
appliance/weblate
+3
-0
weblate/accounts/migrations/0001_initial.py
weblate/accounts/migrations/0001_initial.py
+6
-1
weblate/accounts/models.py
weblate/accounts/models.py
+8
-3
weblate/trans/migrations/0001_initial.py
weblate/trans/migrations/0001_initial.py
+5
-1
No files found.
appliance/weblate
View file @
37c4a08f
...
...
@@ -23,6 +23,9 @@ case "$1" in
echo
'Creating database for Weblate'
su - wwwrun
-s
/bin/bash
-c
'/usr/share/weblate/manage.py syncdb --noinput'
rc_status
-v
-r
echo
'Updating database for Weblate'
su - wwwrun
-s
/bin/bash
-c
'/usr/share/weblate/manage.py migrate'
rc_status
-v
-r
echo
'Adding admin user for Weblate'
su - wwwrun
-s
/bin/bash
-c
'/usr/share/weblate/manage.py createadmin'
rc_status
-v
-r
...
...
weblate/accounts/migrations/0001_initial.py
View file @
37c4a08f
...
...
@@ -7,6 +7,11 @@ from django.db import models
class
Migration
(
SchemaMigration
):
depends_on
=
(
(
'weblate.lang'
,
'0001_initial'
),
(
'weblate.trans'
,
'0001_initial'
),
)
def
forwards
(
self
,
orm
):
# Adding model 'Profile'
db
.
create_table
(
'accounts_profile'
,
(
...
...
weblate/accounts/models.py
View file @
37c4a08f
...
...
@@ -4,6 +4,7 @@ from django.contrib.auth.models import User
from
django.conf
import
settings
from
django.contrib.auth.signals
import
user_logged_in
from
django.db.models.signals
import
post_save
from
django.db.utils
import
DatabaseError
from
django.utils.translation
import
ugettext_lazy
as
_
,
gettext
,
ugettext_noop
from
django.contrib
import
messages
from
django.contrib.auth.models
import
Group
,
Permission
,
User
...
...
@@ -209,9 +210,13 @@ def create_profile_callback(sender, **kwargs):
'''
if
kwargs
[
'created'
]:
# Create profile
try
:
profile
,
newprofile
=
Profile
.
objects
.
get_or_create
(
user
=
kwargs
[
'instance'
])
if
newprofile
:
profile
.
save
except
DatabaseError
:
# Database not set up (we're being run from initial syncdb)
pass
# Add user to Users group if it exists
try
:
...
...
weblate/trans/migrations/0001_initial.py
View file @
37c4a08f
...
...
@@ -7,6 +7,10 @@ from django.db import models
class
Migration
(
SchemaMigration
):
depends_on
=
(
(
'weblate.lang'
,
'0001_initial'
),
)
def
forwards
(
self
,
orm
):
# Adding model 'Project'
db
.
create_table
(
'trans_project'
,
(
...
...
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