Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_father when can i be on my own i have the hello world to see
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
father when can i be on my own i have the hello world to see
widget_father when can i be on my own i have the hello world to see
Commits
03f475c9
Commit
03f475c9
authored
May 14, 2022
by
Charles Lim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created image file for WidgetUser and fixed styles
parent
a91e5594
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
79 additions
and
5 deletions
+79
-5
0004_widgetuser_profile_pic.py
homepage/migrations/0004_widgetuser_profile_pic.py
+18
-0
0005_remove_widgetuser_profile_pic.py
homepage/migrations/0005_remove_widgetuser_profile_pic.py
+17
-0
0006_widgetuser_profile_pic.py
homepage/migrations/0006_widgetuser_profile_pic.py
+18
-0
models.py
homepage/models.py
+7
-2
default_profilepic.png
homepage/static/default_profilepic.png
+0
-0
widgetuser_details.css
homepage/static/widgetuser_details.css
+11
-0
widgetuser_detail.html
homepage/templates/homepage/widgetuser_detail.html
+2
-1
settings.py
..._i_be_on_my_own_i_have_the_hello_world_to_see/settings.py
+2
-0
base_style.css
...y_own_i_have_the_hello_world_to_see/static/base_style.css
+2
-1
urls.py
..._can_i_be_on_my_own_i_have_the_hello_world_to_see/urls.py
+2
-1
No files found.
homepage/migrations/0004_widgetuser_profile_pic.py
0 → 100644
View file @
03f475c9
# Generated by Django 4.0.4 on 2022-05-14 12:45
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0003_alter_widgetuser_email_alter_widgetuser_id_num'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'widgetuser'
,
name
=
'profile_pic'
,
field
=
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
'static'
),
),
]
homepage/migrations/0005_remove_widgetuser_profile_pic.py
0 → 100644
View file @
03f475c9
# Generated by Django 4.0.4 on 2022-05-14 12:48
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0004_widgetuser_profile_pic'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'widgetuser'
,
name
=
'profile_pic'
,
),
]
homepage/migrations/0006_widgetuser_profile_pic.py
0 → 100644
View file @
03f475c9
# Generated by Django 4.0.4 on 2022-05-14 12:49
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0005_remove_widgetuser_profile_pic'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'widgetuser'
,
name
=
'profile_pic'
,
field
=
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
'uploads'
),
),
]
homepage/models.py
View file @
03f475c9
from
django.db
import
models
# Model for Department
class
Department
(
models
.
Model
):
dept_name
=
models
.
CharField
(
max_length
=
100
)
home_unit
=
models
.
CharField
(
max_length
=
100
)
# Model for Widget User
class
WidgetUser
(
models
.
Model
):
first_name
=
models
.
CharField
(
max_length
=
100
)
middle_name
=
models
.
CharField
(
max_length
=
100
)
last_name
=
models
.
CharField
(
max_length
=
100
)
id_num
=
models
.
CharField
(
max_length
=
7
,
default
=
"123456"
)
email
=
models
.
EmailField
(
max_length
=
256
,
default
=
"john.appleseed@gmail.com"
)
email
=
models
.
EmailField
(
max_length
=
256
,
default
=
"john.appleseed@gmail.com"
)
profile_pic
=
models
.
FileField
(
upload_to
=
"uploads"
,
null
=
True
,
blank
=
True
)
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
SET_NULL
,
on_delete
=
models
.
SET_NULL
,
null
=
True
)
homepage/static/default_profilepic.png
0 → 100644
View file @
03f475c9
15.1 KB
homepage/static/widgetuser_details.css
View file @
03f475c9
...
...
@@ -10,4 +10,15 @@ p {
margin-top
:
0
;
margin-bottom
:
20px
;
font-family
:
Oxygen
;
}
h1
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
img
{
border-radius
:
50%
;
border
:
1px
solid
black
;
margin-right
:
30px
;
margin-top
:
-10px
;
}
\ No newline at end of file
homepage/templates/homepage/widgetuser_detail.html
View file @
03f475c9
...
...
@@ -9,11 +9,12 @@
{% endblock %}
{% block header %}
<img
width=
60
height=
60
src=
"{% static '/default_profilepic.png' %}"
/>
{{object.last_name}}, {{object.first_name}} {{object.middle_name}}
{% endblock %}
{% block content %}
<p>
Student ID: {{object.id_num}}
</p>
<p>
Email: {{object.email}}
</p>
<p>
Department: {{object.department.home_unit}}, {{object.department.dept_name}}
</p>
<p>
Department
and Course
: {{object.department.home_unit}}, {{object.department.dept_name}}
</p>
{% endblock %}
\ No newline at end of file
widget_father_when_can_i_be_on_my_own_i_have_the_hello_world_to_see/settings.py
View file @
03f475c9
...
...
@@ -126,6 +126,8 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
[
os
.
path
.
join
(
BASE_DIR
,
'widget_father_when_can_i_be_on_my_own_i_have_the_hello_world_to_see/static'
)]
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
...
...
widget_father_when_can_i_be_on_my_own_i_have_the_hello_world_to_see/static/base_style.css
View file @
03f475c9
...
...
@@ -52,5 +52,6 @@ body {
margin
:
0
;
padding
:
0
;
font-size
:
50px
;
font-family
:
Khula
font-family
:
Khula
;
margin-bottom
:
10px
;
}
\ No newline at end of file
widget_father_when_can_i_be_on_my_own_i_have_the_hello_world_to_see/urls.py
View file @
03f475c9
...
...
@@ -20,6 +20,7 @@ urlpatterns = [
path
(
'homepage/'
,
include
(
"homepage.urls"
,
namespace
=
'homepage'
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
'forum/'
,
include
(
"forum.urls"
,
namespace
=
'forum'
)),
path
(
'announcements/'
,
include
(
"announcement_board.urls"
,
namespace
=
'announcement_board'
)),
path
(
'announcements/'
,
include
(
"announcement_board.urls"
,
namespace
=
'announcement_board'
)),
path
(
'assignments/'
,
include
(
"assignments.urls"
,
namespace
=
'assignments'
)),
]
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