Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_Francoconuts
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Chester Tan
widget_Francoconuts
Commits
9d43b3e8
Commit
9d43b3e8
authored
Mar 23, 2022
by
Bryan Carlo Guanlao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'guanlao/announcements' to master
parents
f7152968
b6c8ed31
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
3 deletions
+42
-3
admin.py
widget_Francoconuts/announcements/admin.py
+9
-1
apps.py
widget_Francoconuts/announcements/apps.py
+1
-0
0001_initial.py
widget_Francoconuts/announcements/migrations/0001_initial.py
+23
-0
__init__.py
widget_Francoconuts/announcements/migrations/__init__.py
+0
-0
0001_initial.cpython-38.pyc
...ements/migrations/__pycache__/0001_initial.cpython-38.pyc
+0
-0
__init__.cpython-38.pyc
...ouncements/migrations/__pycache__/__init__.cpython-38.pyc
+0
-0
models.py
widget_Francoconuts/announcements/models.py
+8
-1
settings.py
widget_Francoconuts/widget_Francoconuts/settings.py
+1
-1
No files found.
widget_Francoconuts/announcements/admin.py
View file @
9d43b3e8
from
django.contrib
import
admin
# Register your models here.
from
.models
import
Announcement
class
AnnouncementAdmin
(
admin
.
ModelAdmin
):
model
=
Announcement
list_display
=
(
'announcement_title'
,
'pub_date'
)
admin
.
site
.
register
(
Announcement
,
AnnouncementAdmin
)
widget_Francoconuts/announcements/apps.py
View file @
9d43b3e8
...
...
@@ -4,3 +4,4 @@ from django.apps import AppConfig
class
AnnouncementsConfig
(
AppConfig
):
default_auto_field
=
'django.db.models.BigAutoField'
name
=
'announcements'
verbose_name
=
'Announcement Board'
widget_Francoconuts/announcements/migrations/0001_initial.py
0 → 100644
View file @
9d43b3e8
# Generated by Django 3.2.12 on 2022-03-22 18:58
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Announcement'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'announcement_title'
,
models
.
CharField
(
max_length
=
50
)),
(
'announcement_body'
,
models
.
TextField
(
max_length
=
500
)),
(
'pub_date'
,
models
.
DateField
(
auto_now_add
=
True
)),
],
),
]
widget_Francoconuts/announcements/migrations/__init__.py
0 → 100644
View file @
9d43b3e8
widget_Francoconuts/announcements/migrations/__pycache__/0001_initial.cpython-38.pyc
0 → 100644
View file @
9d43b3e8
File added
widget_Francoconuts/announcements/migrations/__pycache__/__init__.cpython-38.pyc
View file @
9d43b3e8
No preview for this file type
widget_Francoconuts/announcements/models.py
View file @
9d43b3e8
from
django.db
import
models
# Create your models here.
class
Announcement
(
models
.
Model
):
announcement_title
=
models
.
CharField
(
max_length
=
50
)
announcement_body
=
models
.
TextField
(
max_length
=
500
)
pub_date
=
models
.
DateField
(
auto_now_add
=
True
)
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
announcement_title
)
widget_Francoconuts/widget_Francoconuts/settings.py
View file @
9d43b3e8
...
...
@@ -113,7 +113,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE
=
'en-us'
TIME_ZONE
=
'
UTC
'
TIME_ZONE
=
'
Asia/Manila
'
USE_I18N
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment