瀏覽代碼

HUE-1804 [core] Serve admin static files

Add some models that could be useful.
Not prettification though for now.
Romain Rigaux 11 年之前
父節點
當前提交
75691d9

+ 22 - 0
apps/beeswax/src/beeswax/admin.py

@@ -0,0 +1,22 @@
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from django.contrib import admin
+from beeswax.models import QueryHistory, SavedQuery, Session
+
+admin.site.register(QueryHistory)
+admin.site.register(SavedQuery)
+admin.site.register(Session)

+ 1 - 0
apps/jobsub/src/jobsub/admin.py

@@ -13,6 +13,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 from django.contrib import admin
 from jobsub.models import JobDesign
 

+ 23 - 0
apps/search/src/search/admin.py

@@ -0,0 +1,23 @@
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from django.contrib import admin
+from search.models import Collection, Result, Facet, Sorting
+
+admin.site.register(Collection)
+admin.site.register(Result)
+admin.site.register(Facet)
+admin.site.register(Sorting)

+ 22 - 0
desktop/core/src/desktop/admin.py

@@ -0,0 +1,22 @@
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from django.contrib import admin
+from desktop.models import Document, DocumentPermission, DocumentTag
+
+admin.site.register(Document)
+admin.site.register(DocumentPermission)
+admin.site.register(DocumentTag)

+ 3 - 0
desktop/core/src/desktop/settings.py

@@ -96,6 +96,9 @@ MEDIA_URL = ''
 # Additional locations of static files
 STATICFILES_DIRS = ()
 
+# For Django admin interface
+STATIC_URL = '/static/'
+
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
   'django.template.loaders.filesystem.Loader',