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
7a6a5cc5
Commit
7a6a5cc5
authored
Jun 13, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add management command to list required versions
parent
a882d340
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
docs/management.rst
docs/management.rst
+7
-0
trans/management/commands/list_versions.py
trans/management/commands/list_versions.py
+35
-0
trans/tests/commands.py
trans/tests/commands.py
+6
-0
No files found.
docs/management.rst
View file @
7a6a5cc5
...
@@ -102,6 +102,13 @@ list_ignored_checks
...
@@ -102,6 +102,13 @@ list_ignored_checks
Lists most frequently ignored checks. This can be useful for tuning your setup,
Lists most frequently ignored checks. This can be useful for tuning your setup,
if users have to ignore too many of consistency checks.
if users have to ignore too many of consistency checks.
list_versions
-------------
.. django-admin:: list_versions
Lists versions of Weblate dependencies.
loadpo <project|project/subproject>
loadpo <project|project/subproject>
-----------------------------------
-----------------------------------
...
...
trans/management/commands/list_versions.py
0 → 100644
View file @
7a6a5cc5
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from
django.core.management.base
import
BaseCommand
from
trans.requirements
import
get_versions
class
Command
(
BaseCommand
):
help
=
'lists versions of required software components'
def
handle
(
self
,
*
args
,
**
options
):
'''
Prints versions of dependencies.
'''
for
version
in
get_versions
():
print
' * %s %s'
%
(
version
[
0
],
version
[
2
],
)
trans/tests/commands.py
View file @
7a6a5cc5
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
Tests for management commands.
Tests for management commands.
"""
"""
from
django.test
import
TestCase
from
trans.tests.models
import
RepoTestCase
from
trans.tests.models
import
RepoTestCase
from
django.core.management
import
call_command
from
django.core.management
import
call_command
from
django.core.management.base
import
CommandError
from
django.core.management.base
import
CommandError
...
@@ -116,6 +117,11 @@ class ImportProjectTest(RepoTestCase):
...
@@ -116,6 +117,11 @@ class ImportProjectTest(RepoTestCase):
)
)
class
BasicCommandTest
(
TestCase
):
def
test_versions
(
self
):
call_command
(
'list_versions'
)
class
PeriodicCommandTest
(
RepoTestCase
):
class
PeriodicCommandTest
(
RepoTestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
super
(
PeriodicCommandTest
,
self
).
setUp
()
super
(
PeriodicCommandTest
,
self
).
setUp
()
...
...
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