Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonathan Talbot
widget_group3
Commits
ce604261
Commit
ce604261
authored
Mar 23, 2022
by
Joshua de Vera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
models updated
parent
1fc0333b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
models.py
widget_group3/widget_group3/models.py
+2
-2
settings.py
widget_group3/widget_group3/settings.py
+1
-0
No files found.
widget_group3/widget_group3/models.py
View file @
ce604261
from
django.db
import
models
from
django.db
import
models
from
django.urls
import
reverse
from
django.urls
import
reverse
class
Announcement
Admin
(
models
.
Model
):
class
Announcement
(
models
.
Model
):
announcement_title
=
models
.
CharField
(
max_length
=
50
)
announcement_title
=
models
.
CharField
(
max_length
=
50
)
announcement_body
=
models
.
CharField
(
max_length
=
200
)
announcement_body
=
models
.
CharField
(
max_length
=
200
)
pub_date
=
models
.
DateTimeField
(
auto_now_add
=
True
)
pub_date
=
models
.
DateTimeField
(
auto_now_add
=
True
)
...
@@ -10,7 +10,7 @@ class AnnouncementAdmin(models.Model):
...
@@ -10,7 +10,7 @@ class AnnouncementAdmin(models.Model):
return
self
.
full_announcement
return
self
.
full_announcement
def
get_absolute_url
(
self
):
def
get_absolute_url
(
self
):
return
reverse
(
'Announcement'
,
args
=
[(
self
.
full_
name
)])
return
reverse
(
'Announcement'
,
args
=
[(
self
.
full_
announcement
)])
@
property
@
property
def
full_announcement
(
self
):
def
full_announcement
(
self
):
...
...
widget_group3/widget_group3/settings.py
View file @
ce604261
...
@@ -40,6 +40,7 @@ INSTALLED_APPS = [
...
@@ -40,6 +40,7 @@ INSTALLED_APPS = [
'django.contrib.sessions'
,
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'django.contrib.staticfiles'
,
'widget_group3'
]
]
MIDDLEWARE
=
[
MIDDLEWARE
=
[
...
...
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