mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. (Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
38 lines
985 B
Python
38 lines
985 B
Python
#
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
|
|
from django.contrib import admin
|
|
from orm.models import BitbakeVersion, Release, ToasterSetting, Layer_Version
|
|
from django import forms
|
|
import django.db.models as models
|
|
|
|
|
|
class BitbakeVersionAdmin(admin.ModelAdmin):
|
|
|
|
# we override the formfield for db URLField
|
|
# because of broken URL validation
|
|
|
|
def formfield_for_dbfield(self, db_field, **kwargs):
|
|
if isinstance(db_field, models.fields.URLField):
|
|
return forms.fields.CharField()
|
|
return super(BitbakeVersionAdmin, self).formfield_for_dbfield(
|
|
db_field, **kwargs)
|
|
|
|
|
|
class ReleaseAdmin(admin.ModelAdmin):
|
|
pass
|
|
|
|
|
|
class ToasterSettingAdmin(admin.ModelAdmin):
|
|
pass
|
|
|
|
|
|
class LayerVersionsAdmin(admin.ModelAdmin):
|
|
pass
|
|
|
|
admin.site.register(Layer_Version, LayerVersionsAdmin)
|
|
admin.site.register(BitbakeVersion, BitbakeVersionAdmin)
|
|
admin.site.register(Release, ReleaseAdmin)
|
|
admin.site.register(ToasterSetting, ToasterSettingAdmin)
|