<commit_before>from mezzanine.pages.admin import PageAdmin
from django.contrib.gis import admin
from ga_resources.models import *
from django.forms import ModelForm
from django import forms

class RenderedLayerAdminForm(ModelForm):
   data_resource = forms.ModelChoiceField(queryset=DataResource.objects.order_by('slug'))
   default_style = forms.ModelChoiceField(queryset=Style.objects.order_by('slug'))
   styles = forms.ModelMultipleChoiceField(queryset=Style.objects.order_by('slug'))

   class Meta:
      model = RenderedLayer
      fields = ['data_resource', 'default_style', 'default_class', 'styles', 'public', 'owner']

class RenderedLayerAdmin(PageAdmin):
   form = RenderedLayerAdminForm

# TODO add prepopulated fields to all models with slug fields.
# class ArticleAdmin(admin.ModelAdmin):
#   prepopulated_fields = {"slug": ("title",)}


#class OSMPageAdmin(admin.OSMGeoAdmin):
#    fieldsets = deepcopy(PageAdmin.fieldsets)

#class DataResourceAdmin(admin.OSMGeoAdmin):
#    fieldsets = deepcopy(PageAdmin.fieldsets) + ((None, {"fields" : (
#        'content',
#        "resource_file", "resource_url", "resource_irods_env", "resource_irods_file",
#        "time_represented","perform_caching","cache_ttl","data_cache","bounding_box","kind","driver"
#    )}),)

admin.site.register(CatalogPage, PageAdmin)
#admin.site.register(Verb, PageAdmin)
admin.site.register(DataResource, PageAdmin)
admin.site.register(ResourceGroup, PageAdmin)
admin.site.register(OrderedResource)

admin.site.register(RelatedResource, PageAdmin)

admin.site.register(RenderedLayer, RenderedLayerAdmin)
admin.site.register(Style, PageAdmin)<commit_msg>removed ga_resources from admin panel<commit_after>from mezzanine.pages.admin import PageAdmin
from ga_resources.models import *
from django.forms import ModelForm
from django import forms

class RenderedLayerAdminForm(ModelForm):
   data_resource = forms.ModelChoiceField(queryset=DataResource.objects.order_by('slug'))
   default_style = forms.ModelChoiceField(queryset=Style.objects.order_by('slug'))
   styles = forms.ModelMultipleChoiceField(queryset=Style.objects.order_by('slug'))

   class Meta:
      model = RenderedLayer
      fields = ['data_resource', 'default_style', 'default_class', 'styles', 'public', 'owner']

class RenderedLayerAdmin(PageAdmin):
   form = RenderedLayerAdminForm
{'fraction_non_alphanumeric': 0.1170940170940171, 'fraction_numerical': 0.0, 'mean_word_length': 6.60064935064935, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7620323', 'n_tokens_mistral': 706, 'n_tokens_neox': 695, 'n_words': 129}