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
7a3d8066
Commit
7a3d8066
authored
Mar 30, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add field for tracking project ownership
Issue #636 Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
76ae4fd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
weblate/trans/migrations/0023_project_owner.py
weblate/trans/migrations/0023_project_owner.py
+22
-0
weblate/trans/models/project.py
weblate/trans/models/project.py
+10
-1
No files found.
weblate/trans/migrations/0023_project_owner.py
0 → 100644
View file @
7a3d8066
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
from
django.conf
import
settings
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'trans'
,
'0022_auto_20150309_0932'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'project'
,
name
=
'owner'
,
field
=
models
.
ForeignKey
(
blank
=
True
,
to
=
settings
.
AUTH_USER_MODEL
,
help_text
=
'Owner of the project.'
,
null
=
True
),
preserve_default
=
True
,
),
]
weblate/trans/models/project.py
View file @
7a3d8066
...
...
@@ -23,7 +23,7 @@ from django.utils.translation import ugettext as _, ugettext_lazy
from
django.core.exceptions
import
ValidationError
,
PermissionDenied
from
django.contrib
import
messages
from
django.core.urlresolvers
import
reverse
from
django.contrib.auth.models
import
Permission
from
django.contrib.auth.models
import
Permission
,
User
from
django.contrib.contenttypes.models
import
ContentType
from
django.contrib.auth.models
import
Group
from
django.core.cache
import
cache
...
...
@@ -129,6 +129,15 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
'Whether to allow updating this repository by remote hooks.'
)
)
owner
=
models
.
ForeignKey
(
User
,
null
=
True
,
db_index
=
True
,
blank
=
True
,
help_text
=
ugettext_lazy
(
'Owner of the project.'
)
)
objects
=
ProjectManager
()
...
...
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