<commit_before># -*- coding: utf-8 -*-
from django.contrib import admin

from scarface.forms import PlatformAdminForm
from scarface.models import Application, Platform, Topic, PushMessage

__author__ = 'janmeier'

class PlatformInline(admin.TabularInline):
    model = Platform
    extra = 0
    form = PlatformAdminForm

class ApplicationAdmin(admin.ModelAdmin):
    inlines = [PlatformInline]
    list_display = ['name']


class PlatformAdmin(admin.ModelAdmin):
    list_display = ['platform', 'application', 'arn']
    form = PlatformAdminForm


class TopicAdmin(admin.ModelAdmin):
    list_display = ['name', 'application', 'arn']


admin.site.register(Application, ApplicationAdmin)
admin.site.register(Platform, PlatformAdmin)
admin.site.register(Topic, TopicAdmin)
admin.site.register(PushMessage)
<commit_msg>added device to admin area<commit_after># -*- coding: utf-8 -*-
from django.contrib import admin

from scarface.forms import PlatformAdminForm
from scarface.models import Application, Platform, Topic, PushMessage, Device

__author__ = 'janmeier'

class PlatformInline(admin.TabularInline):
    model = Platform
    extra = 0
    form = PlatformAdminForm

class ApplicationAdmin(admin.ModelAdmin):
    inlines = [PlatformInline]
    list_display = ['name']


class PlatformAdmin(admin.ModelAdmin):
    list_display = ['platform', 'application', 'arn']
    form = PlatformAdminForm


class TopicAdmin(admin.ModelAdmin):
    list_display = ['name', 'application', 'arn']


class DeviceAdmin(admin.ModelAdmin):
    list_display = ['device_id', 'platform', 'arn', 'push_token']


admin.site.register(Application, ApplicationAdmin)
admin.site.register(Platform, PlatformAdmin)
admin.site.register(Topic, TopicAdmin)
admin.site.register(PushMessage)
admin.site.register(Device, DeviceAdmin)

{'fraction_non_alphanumeric': 0.11327040533037201, 'fraction_numerical': 0.002220988339811216, 'mean_word_length': 5.412811387900356, 'pattern_counts': {'":': 0, '<': 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': '3051865', 'n_tokens_mistral': 519, 'n_tokens_neox': 513, 'n_words': 124}