Statistics
| Branch: | Tag: | Revision:

root / db / admin.py @ 52194743

History | View | Annotate | Download (1.7 kB)

1 78dec216 Vassilios Karakoidas
from django.contrib import admin
2 78dec216 Vassilios Karakoidas
from django import forms
3 78dec216 Vassilios Karakoidas
from django.db import models
4 78dec216 Vassilios Karakoidas
from django.utils.encoding import iri_to_uri
5 78dec216 Vassilios Karakoidas
from django.utils.translation import gettext_lazy as _
6 78dec216 Vassilios Karakoidas
from models import  *
7 78dec216 Vassilios Karakoidas
8 78dec216 Vassilios Karakoidas
class LimitForm(forms.ModelForm):
9 78dec216 Vassilios Karakoidas
    class Meta:
10 78dec216 Vassilios Karakoidas
        model = Limit
11 78dec216 Vassilios Karakoidas
12 78dec216 Vassilios Karakoidas
class LimitAdmin(admin.ModelAdmin):
13 78dec216 Vassilios Karakoidas
    ""    
14 78dec216 Vassilios Karakoidas
15 78dec216 Vassilios Karakoidas
    form = LimitForm
16 78dec216 Vassilios Karakoidas
17 78dec216 Vassilios Karakoidas
18 78dec216 Vassilios Karakoidas
class FlavorForm(forms.ModelForm):
19 78dec216 Vassilios Karakoidas
    class Meta:
20 78dec216 Vassilios Karakoidas
        model = Flavor
21 78dec216 Vassilios Karakoidas
22 78dec216 Vassilios Karakoidas
class FlavorAdmin(admin.ModelAdmin):
23 78dec216 Vassilios Karakoidas
    ""    
24 78dec216 Vassilios Karakoidas
25 78dec216 Vassilios Karakoidas
    form = FlavorForm
26 78dec216 Vassilios Karakoidas
27 78dec216 Vassilios Karakoidas
28 78dec216 Vassilios Karakoidas
class VirtualMachineForm(forms.ModelForm):
29 78dec216 Vassilios Karakoidas
    class Meta:
30 78dec216 Vassilios Karakoidas
        model = VirtualMachine
31 78dec216 Vassilios Karakoidas
32 78dec216 Vassilios Karakoidas
class VirtualMachineAdmin(admin.ModelAdmin):
33 78dec216 Vassilios Karakoidas
    ""    
34 78dec216 Vassilios Karakoidas
35 78dec216 Vassilios Karakoidas
    form = VirtualMachineForm
36 78dec216 Vassilios Karakoidas
37 a31ff6cb Markos Gogoulos
class VirtualMachineGroupForm(forms.ModelForm):
38 a31ff6cb Markos Gogoulos
    class Meta:
39 a31ff6cb Markos Gogoulos
        model = VirtualMachineGroup
40 a31ff6cb Markos Gogoulos
41 a31ff6cb Markos Gogoulos
class VirtualMachineGroupAdmin(admin.ModelAdmin):
42 a31ff6cb Markos Gogoulos
    ""    
43 a31ff6cb Markos Gogoulos
44 a31ff6cb Markos Gogoulos
    form = VirtualMachineGroupForm
45 78dec216 Vassilios Karakoidas
46 ec2c2cf9 Markos Gogoulos
class AccountingLogForm(forms.ModelForm):
47 78dec216 Vassilios Karakoidas
    class Meta:
48 ec2c2cf9 Markos Gogoulos
        model = AccountingLog
49 78dec216 Vassilios Karakoidas
50 ec2c2cf9 Markos Gogoulos
class AccountingLogAdmin(admin.ModelAdmin):
51 78dec216 Vassilios Karakoidas
    ""    
52 78dec216 Vassilios Karakoidas
53 ec2c2cf9 Markos Gogoulos
    form = AccountingLogForm
54 78dec216 Vassilios Karakoidas
55 d08a5f6f Vangelis Koukis
class SynnefoUserForm(forms.ModelForm):
56 22571df6 Vassilios Karakoidas
    class Meta:
57 d08a5f6f Vangelis Koukis
        model = SynnefoUser
58 22571df6 Vassilios Karakoidas
59 d08a5f6f Vangelis Koukis
class SynnefoUserAdmin(admin.ModelAdmin):
60 22571df6 Vassilios Karakoidas
    ""
61 d08a5f6f Vangelis Koukis
    form = SynnefoUserForm
62 22571df6 Vassilios Karakoidas
63 ec2c2cf9 Markos Gogoulos
class ImageForm(forms.ModelForm):
64 ec2c2cf9 Markos Gogoulos
    class Meta:
65 ec2c2cf9 Markos Gogoulos
        model = Image
66 ec2c2cf9 Markos Gogoulos
67 ec2c2cf9 Markos Gogoulos
class ImageAdmin(admin.ModelAdmin):
68 ec2c2cf9 Markos Gogoulos
    ""
69 ec2c2cf9 Markos Gogoulos
    form = ImageForm
70 ec2c2cf9 Markos Gogoulos
71 ec2c2cf9 Markos Gogoulos
72 78dec216 Vassilios Karakoidas
admin.site.register(Limit, LimitAdmin)
73 d08a5f6f Vangelis Koukis
admin.site.register(SynnefoUser, SynnefoUserAdmin)
74 78dec216 Vassilios Karakoidas
admin.site.register(Flavor, FlavorAdmin)
75 78dec216 Vassilios Karakoidas
admin.site.register(VirtualMachine, VirtualMachineAdmin)
76 a31ff6cb Markos Gogoulos
admin.site.register(VirtualMachineGroup, VirtualMachineGroupAdmin)
77 ec2c2cf9 Markos Gogoulos
admin.site.register(AccountingLog, AccountingLogAdmin)
78 ec2c2cf9 Markos Gogoulos
admin.site.register(Image, ImageAdmin)