You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
646 B

# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from django.test.client import RequestFactory
from django.utils import translation
from django.conf import settings
from exposition.views import ExpositionByCity
class Command(BaseCommand):
def handle(self, *args, **options):
langs = [code for code, name in settings.LANGUAGES]
for lang in langs:
translation.activate(lang)
request = RequestFactory().get('/expo/city/')
view = ExpositionByCity.as_view()
response = view(request)
print(lang)
print('success')