-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the new model 'Technology' to app core
- Loading branch information
1 parent
10738ab
commit ef0c850
Showing
5 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
from django.contrib import admin | ||
from .models import ContactMessage | ||
from .models import ContactMessage, Technology | ||
|
||
# Register your models here. | ||
class ContactMessageAdmin(admin.ModelAdmin): | ||
readonly_fields = () | ||
|
||
class TechnologyAdmin(admin.ModelAdmin): | ||
readonly_fields = ('name', 'created') | ||
|
||
admin.site.register(ContactMessage, ContactMessageAdmin) | ||
admin.site.register(ContactMessage, ContactMessageAdmin) | ||
admin.site.register(Technology, TechnologyAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 4.0.4 on 2022-06-20 17:47 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Technology', | ||
fields=[ | ||
('name', models.CharField(max_length=25, primary_key=True, serialize=False, verbose_name='Name')), | ||
('created', models.DateTimeField(auto_now=True, verbose_name='Created date')), | ||
('updated', models.DateTimeField(auto_now=True, verbose_name='Updated date')), | ||
], | ||
options={ | ||
'verbose_name': 'technology', | ||
'verbose_name_plural': 'technologies', | ||
'ordering': ['name'], | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.0.4 on 2022-06-20 19:17 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0002_technology'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='technology', | ||
name='updated', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters