예제 #1
0
    def setUp(self):
        self.user = self.__create_test_user("user", "pass", True)
        self.client = Client()

        init_ella_workflow(get_all_resource_classes())
        create_basic_categories(self)

        Article.objects.create(title="Jop", slug="jop", category=self.category,
            publish_from=timezone.now())
        Article.objects.create(title="Spinach", category=self.category_nested,
            publish_from=timezone.now(), slug="spinach")
        Article.objects.create(title="Jop3", category=self.category,
            publish_from=timezone.now(), slug="jop3")
예제 #2
0
 def setUp(self):
     init_ella_workflow(get_all_resource_classes())
     self.user = self.__create_test_user("user", "pass", is_admin=True)
     create_basic_categories(self)
     self.article = Article.objects.create(title="Art title",
         category=self.category, publish_from=timezone.now(), slug="article")
예제 #3
0
파일: urls.py 프로젝트: SanomaCZ/ella-hub
from django.contrib import admin
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from ella_hub.api import EllaHubApi
from ella_hub.utils.workflow import init_ella_workflow

admin.autodiscover()

# admin API setup
admin_api = EllaHubApi('admin-api')
resources = admin_api.collect_resources()
admin_api.register_resources(resources)
init_ella_workflow(resources)


urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include(admin_api.urls)),
    url(r'^', include('ella.core.urls')),
)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += staticfiles_urlpatterns()
예제 #4
0
 def setUp(self):
     init_ella_workflow(get_all_resource_classes())
     self.user = self.__create_test_user("user", "pass", True)
     self.client = Client()
예제 #5
0
 def handle(self, *args, **options):
     init_ella_workflow(resources=EllaHubApi.collect_resources())
     print 'done'