Commit f01f9db2 authored by Michal Čihař's avatar Michal Čihař

Add field for disabling hooks per project

Issue #545
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 5ed49db4
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('trans', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='project',
name='enable_hooks',
field=models.BooleanField(default=True, help_text='Whether to allow updating this repository by remote hooks.', verbose_name='Enable hooks'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('trans', '0002_auto_20141021_1347'),
]
operations = [
migrations.AlterField(
model_name='subproject',
name='allow_translation_propagation',
field=models.BooleanField(default=True, help_text='Whether translation updates in other resources will cause automatic translation in this one', verbose_name='Allow translation propagation'),
),
migrations.AlterField(
model_name='subproject',
name='locked',
field=models.BooleanField(default=False, help_text='Whether resource is locked for translation updates.', verbose_name='Locked'),
),
migrations.AlterField(
model_name='subproject',
name='name',
field=models.CharField(help_text='Name to display', max_length=100, verbose_name='Resource name'),
),
migrations.AlterField(
model_name='subproject',
name='repo',
field=models.CharField(help_text='URL of Git repository, use weblate://project/resource for sharing with other resource.', max_length=200, verbose_name='Source code repository'),
),
]
...@@ -190,6 +190,13 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin): ...@@ -190,6 +190,13 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
'documentation before enabling this.' 'documentation before enabling this.'
) )
) )
enable_hooks = models.BooleanField(
verbose_name=ugettext_lazy('Enable hooks'),
default=True,
help_text=ugettext_lazy(
'Whether to allow updating this repository by remote hooks.'
)
)
objects = ProjectManager() objects = ProjectManager()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment