Commit 2ddfc13c authored by Michal Čihař's avatar Michal Čihař

Merge remote-tracking branch 'origin/master'

parents ef3af63a 6d9a6b1d
......@@ -12,6 +12,13 @@ The ./manage.py is extended with following commands:
You can either define which subproject to check (eg. ``weblate/master``) or
use ``--all`` to check all existing subprojects.
.. option:: commitgit
Commits any possible pending changes to backend git repository.
You can either define which subproject to check (eg. ``weblate/master``) or
use ``--all`` to check all existing subprojects.
.. option:: cleanuptrans
Cleanups orphnaed checks and translation suggestions.
......
from django.core.management.base import BaseCommand, CommandError
from trans.models import SubProject
from optparse import make_option
class Command(BaseCommand):
help = 'forces commiting changes to git repo'
args = '<project/subproject>'
option_list = BaseCommand.option_list + (
make_option('--all',
action='store_true',
dest='all',
default=False,
help='Check all projects'),
)
def handle(self, *args, **options):
if options['all']:
for s in SubProject.objects.all():
s.check_commit_needed()
for arg in args:
prj, subprj = arg.split('/')
s = SubProject.objects.get(slug = subprj, project__slug = prj)
s.check_commit_needed()
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