Exemple #1
0
from django.conf.urls import include, url

from weblate.api.routers import WeblateRouter
from weblate.api.views import (
    ChangeViewSet,
    ComponentViewSet,
    LanguageViewSet,
    Metrics,
    ProjectViewSet,
    ScreenshotViewSet,
    TranslationViewSet,
    UnitViewSet,
)

# Routers provide an easy way of automatically determining the URL conf.
router = WeblateRouter()
router.register(r"projects", ProjectViewSet)
router.register(r"components", ComponentViewSet, "component")
router.register(r"translations", TranslationViewSet)
router.register(r"languages", LanguageViewSet)
router.register(r"changes", ChangeViewSet)
router.register(r"units", UnitViewSet)
router.register(r"screenshots", ScreenshotViewSet)

# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
    url(r"^metrics/$", Metrics.as_view(), name="metrics"),
    url(r"^", include(router.urls)),
]
Exemple #2
0
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#

from __future__ import unicode_literals

from django.conf.urls import url, include

from weblate.api.views import (
    ProjectViewSet, ComponentViewSet, TranslationViewSet, LanguageViewSet,
    UnitViewSet, ChangeViewSet, SourceViewSet, ScreenshotViewSet,
)
from weblate.api.routers import WeblateRouter

# Routers provide an easy way of automatically determining the URL conf.
router = WeblateRouter()
router.register(
    r'projects',
    ProjectViewSet
)
router.register(
    r'components',
    ComponentViewSet,
    'component',
)
router.register(
    r'translations',
    TranslationViewSet
)
router.register(
    r'languages',
Exemple #3
0
    ComponentListViewSet,
    ComponentViewSet,
    GroupViewSet,
    LanguageViewSet,
    Metrics,
    ProjectViewSet,
    RoleViewSet,
    ScreenshotViewSet,
    TasksViewSet,
    TranslationViewSet,
    UnitViewSet,
    UserViewSet,
)

# Routers provide an easy way of automatically determining the URL conf.
router = WeblateRouter()
router.register("users", UserViewSet)
router.register("groups", GroupViewSet)
router.register("roles", RoleViewSet)
router.register("projects", ProjectViewSet)
router.register("components", ComponentViewSet)
router.register("translations", TranslationViewSet)
router.register("languages", LanguageViewSet)
router.register("component-lists", ComponentListViewSet)
router.register("changes", ChangeViewSet)
router.register("units", UnitViewSet)
router.register("screenshots", ScreenshotViewSet)
router.register("tasks", TasksViewSet, "task")
router.register("addons", AddonViewSet)

# Wire up our API using automatic URL routing.
Exemple #4
0
from django.conf.urls import include, url

from weblate.api.routers import WeblateRouter
from weblate.api.views import (
    ChangeViewSet,
    ComponentViewSet,
    LanguageViewSet,
    Metrics,
    ProjectViewSet,
    ScreenshotViewSet,
    TranslationViewSet,
    UnitViewSet,
)

# Routers provide an easy way of automatically determining the URL conf.
router = WeblateRouter()
router.register(r'projects', ProjectViewSet)
router.register(r'components', ComponentViewSet, 'component')
router.register(r'translations', TranslationViewSet)
router.register(r'languages', LanguageViewSet)
router.register(r'changes', ChangeViewSet)
router.register(r'units', UnitViewSet)
router.register(r'screenshots', ScreenshotViewSet)


# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
    url(r'^metrics/$', Metrics.as_view(), name='metrics'),
    url(r'^', include(router.urls)),
]
Exemple #5
0
#
# 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 __future__ import unicode_literals

from django.conf.urls import url, include

from weblate.api.views import (
    ProjectViewSet, ComponentViewSet, TranslationViewSet, LanguageViewSet,
)
from weblate.api.routers import WeblateRouter

# Routers provide an easy way of automatically determining the URL conf.
router = WeblateRouter()
router.register(
    r'projects',
    ProjectViewSet
)
router.register(
    r'components',
    ComponentViewSet,
    'component',
)
router.register(
    r'translations',
    TranslationViewSet
)
router.register(
    r'languages',
Exemple #6
0
#

from __future__ import unicode_literals

from django.conf.urls import url, include

from weblate.api.views import (
    ProjectViewSet,
    ComponentViewSet,
    TranslationViewSet,
    LanguageViewSet,
)
from weblate.api.routers import WeblateRouter

# Routers provide an easy way of automatically determining the URL conf.
router = WeblateRouter()
router.register(r'projects', ProjectViewSet)
router.register(
    r'components',
    ComponentViewSet,
    'component',
)
router.register(r'translations', TranslationViewSet)
router.register(r'languages', LanguageViewSet)

# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
    url(r'^', include(router.urls)),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework'))