/",
24 | CustomPasswordResetConfirmView.as_view(), name='password_reset_confirm'
25 | ),
26 | path("", include("accounts.urls")),
27 | path('admin/', admin.site.urls),
28 | ]
29 |
--------------------------------------------------------------------------------
/core/utils.py:
--------------------------------------------------------------------------------
1 | import math
2 | # from spamfighter.models import BlockedIps
3 | import os
4 | import random
5 | import re
6 | import string
7 | import unicodedata
8 |
9 | from django.core.exceptions import ValidationError
10 | from django.utils.html import strip_tags
11 | from django.utils.text import slugify
12 | from django.utils.translation import gettext_lazy as _
13 |
14 | # 2.5MB - 2621440
15 | # 5MB - 5242880
16 | # 10MB - 10485760
17 | # 20MB - 20971520
18 | # 50MB - 5242880
19 | # 100MB 104857600
20 | # 250MB - 214958080
21 | # 500MB - 429916160
22 | MAX_UPLOAD_SIZE = "5242880"
23 |
24 |
25 | def random_string_generator(size=10, chars=string.ascii_lowercase + string.digits):
26 | return ''.join(random.choice(chars) for _ in range(size))
27 |
28 |
29 | def unique_key_generator(instance):
30 | size = random.randint(30, 45)
31 | key_id = random_string_generator(size=size)
32 |
33 | Klass = instance.__class__
34 | qs_exists = Klass.objects.filter(key=key_id).exists()
35 | if qs_exists:
36 | return unique_slug_generator(instance)
37 | return key_id
38 |
39 |
40 | def unique_slug_generator(instance, new_slug=None):
41 | if new_slug is not None:
42 | slug = new_slug
43 | else:
44 | slug = slugify(instance.title)
45 |
46 | Klass = instance.__class__
47 | qs_exists = Klass.objects.filter(slug=slug).exists()
48 | if qs_exists:
49 | new_slug = "{slug}-{randstr}".format(
50 | slug=slug,
51 | randstr=random_string_generator(size=4)
52 | )
53 | return unique_slug_generator(instance, new_slug=new_slug)
54 | return slug
55 |
56 |
57 | def get_ip_address(request):
58 | ip = request.META.get('HTTP_X_FORWARDED_FOR') # more reliable
59 | if ip:
60 | ip = ip.split(',')[0]
61 | else:
62 | ip = request.META.get('REMOTE_ADDR') # less reliable
63 | return ip
64 |
65 |
66 | # def check_ip_address(ip):
67 | # return BlockedIps.objects.filter(ip_address=ip).exists()
68 |
69 |
70 | def validate_doc_file_extension(value):
71 | ext = os.path.splitext(value.name)[1]
72 | valid_extensions = ['.pdf', '.doc', '.docx']
73 | if not ext in valid_extensions:
74 | raise ValidationError(
75 | _('File not supported!'),
76 | code='invalid',
77 | params={'value': value},
78 | )
79 | else:
80 | return value
81 |
82 |
83 | def validate_doc_image_file_extension(value):
84 | ext = os.path.splitext(value.name)[1] # [0] returns path+filename
85 | valid_extensions = ['.pdf', '.doc', '.docx', '.jpg',
86 | '.png', '.xlsx', '.xls', '.txt', '.zip', '.rar']
87 | if not ext.lower() in valid_extensions:
88 | raise ValidationError(
89 | _('Unsupported file extension.'),
90 | code='invalid',
91 | params={'value': value},
92 | )
93 | else:
94 | return value
95 |
96 |
97 | # Size less than # 5MB - 5242880
98 | def validate_file_size(value):
99 | filesize = value.size
100 | if filesize < 0 or filesize > 5242880:
101 | raise ValidationError(
102 | _("The file size is unacceptable! Enter size less than 5MB."),
103 | code='invalid',
104 | params={'value': value},
105 | )
106 | else:
107 | return value
108 |
109 |
110 | def validate_fullname(self):
111 | fullname = self.split()
112 | if len(fullname) <= 1:
113 | raise ValidationError(
114 | _('Kindly enter more than one name, please.'),
115 | code='invalid',
116 | params={'value': self},
117 | )
118 | for x in fullname:
119 | if x.isalpha() is False or len(x) < 2:
120 | raise ValidationError(
121 | _('Please enter your name correctly.'),
122 | code='invalid',
123 | params={'value': self},
124 | )
125 |
126 |
127 | def get_first_name(self):
128 | if isinstance(self, bool):
129 | pass
130 | else:
131 | names = self.split()
132 | return names[0]
133 |
134 |
135 | def get_last_name(self):
136 | if isinstance(self, bool):
137 | pass
138 | else:
139 | names = self.split()
140 | return names[-1]
141 |
142 |
143 | def generate_username(self, full_name, Model):
144 | name = full_name.lower()
145 | name = name.split(' ')
146 | lastname = name[-1]
147 | firstname = name[0]
148 | self.username = '%s%s' % (firstname[0], lastname)
149 | if Model.objects.filter(username=self.username).count() > 0:
150 | username = '%s%s' % (firstname, lastname[0])
151 | if Model.objects.filter(username=self.username).count() > 0:
152 | users = Model.objects.filter(username__regex=r'^%s[1-9]{1,}$' % firstname).order_by(
153 | 'username').values(
154 | 'username')
155 | if len(users) > 0:
156 | last_number_used = sorted(
157 | map(lambda x: int(x['username'].replace(firstname, '')), users))
158 | last_number_used = last_number_used[-1]
159 | number = last_number_used + 1
160 | self.username = '%s%s' % (firstname, number)
161 | else:
162 | self.username = '%s%s' % (firstname, 1)
163 | return self.username
164 |
165 |
166 |
167 | def random_string(size: int, chars: str = string.ascii_lowercase+string.digits) -> str:
168 | """
169 | Generate random strings from a given size
170 | """
171 | return "".join(random.choices(chars, k = size))
172 |
173 |
174 | def slugify(value, allow_unicode=False):
175 | """
176 | Convert to ASCII if 'allow_unicode' is False. Convert spaces or repeated
177 | dashes to single dashes. Remove characters that aren't alphanumerics,
178 | underscores, or hyphens. Convert to lowercase. Also strip leading and
179 | trailing whitespace, dashes, and underscores.
180 | """
181 | value = str(value)
182 | if allow_unicode:
183 | value = unicodedata.normalize('NFKC', value)
184 | else:
185 | value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
186 | value = re.sub(r'[^\w\s-]', '', value.lower())
187 | return re.sub(r'[-\s]+', '-', value).strip('-_')
188 |
189 |
190 | def unique_slug_generator(value, new_slug=False):
191 | """
192 | This generates a unique slug using your model slug value
193 | assuming there's a model with a slug field and
194 | a title character (char) field.
195 | If a slug exists, it generates a unique slug with the old and random
196 | otherwise, it generates a new slug
197 | """
198 | if new_slug:
199 | return f"{slugify(value)}-{random_string(4)}"
200 | return slugify(value)
201 |
202 |
203 | def count_words(content):
204 | """Count all the words received from a parameter."""
205 | matching_words = re.findall(r'\w+', content)
206 | count = len(matching_words)
207 | return count
208 |
209 |
210 | def get_read_time(content):
211 | """Get the read length by dividing with an average of 200wpm """
212 | count = count_words(content)
213 | read_length_min = math.ceil(count/200.0)
214 | return int(read_length_min)
215 |
--------------------------------------------------------------------------------
/core/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for core project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | """Run administrative tasks."""
9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
10 | try:
11 | from django.core.management import execute_from_command_line
12 | except ImportError as exc:
13 | raise ImportError(
14 | "Couldn't import Django. Are you sure it's installed and "
15 | "available on your PYTHONPATH environment variable? Did you "
16 | "forget to activate a virtual environment?"
17 | ) from exc
18 | execute_from_command_line(sys.argv)
19 |
20 |
21 | if __name__ == '__main__':
22 | main()
23 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | anyio==3.3.4
2 | asgiref==3.4.1
3 | certifi==2021.10.8
4 | cffi==1.15.0
5 | charset-normalizer==2.0.7
6 | click==8.0.3
7 | cryptography==35.0.0
8 | defusedxml==0.7.1
9 | dj-rest-auth==2.1.11
10 | Django==4.0.0
11 | django-allauth==0.45.0
12 | django-cors-headers==3.10.0
13 | djangorestframework==3.12.4
14 | djangorestframework-simplejwt==5.0.0
15 | dnspython==2.1.0
16 | email-validator==1.1.3
17 | fastapi==0.70.0
18 | h11==0.12.0
19 | idna==3.3
20 | oauthlib==3.1.1
21 | Pillow==8.4.0
22 | pycparser==2.20
23 | pydantic==1.8.2
24 | PyJWT==2.3.0
25 | python3-openid==3.2.0
26 | pytz==2021.3
27 | requests==2.26.0
28 | requests-oauthlib==1.3.0
29 | sniffio==1.2.0
30 | sqlparse==0.4.2
31 | starlette==0.16.0
32 | typing-extensions==3.10.0.2
33 | urllib3==1.26.7
34 | uvicorn==0.15.0
35 |
--------------------------------------------------------------------------------
/templates/Screenshot 2021-10-23 at 23.12.52.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drmacsika/fastapi-django-combo/3025332d87a8da1ef13bfd7c6e27d23c9b4af685/templates/Screenshot 2021-10-23 at 23.12.52.png
--------------------------------------------------------------------------------
/templates/Screenshot 2021-10-23 at 23.13.05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drmacsika/fastapi-django-combo/3025332d87a8da1ef13bfd7c6e27d23c9b4af685/templates/Screenshot 2021-10-23 at 23.13.05.png
--------------------------------------------------------------------------------
/templates/Screenshot 2021-10-23 at 23.13.42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drmacsika/fastapi-django-combo/3025332d87a8da1ef13bfd7c6e27d23c9b4af685/templates/Screenshot 2021-10-23 at 23.13.42.png
--------------------------------------------------------------------------------
/templates/Screenshot 2021-10-23 at 23.13.51.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drmacsika/fastapi-django-combo/3025332d87a8da1ef13bfd7c6e27d23c9b4af685/templates/Screenshot 2021-10-23 at 23.13.51.png
--------------------------------------------------------------------------------
/templates/accounts/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% block head_title %}{% endblock %}
5 | {% block extra_head %}
6 | {% endblock %}
7 |
8 |
9 | {% block body %}
10 |
11 | {% if messages %}
12 |
13 |
Messages:
14 |
15 | {% for message in messages %}
16 | - {{message}}
17 | {% endfor %}
18 |
19 |
20 | {% endif %}
21 |
22 |
34 | {% block content %}
35 | {% endblock %}
36 | {% endblock %}
37 | {% block extra_body %}
38 | {% endblock %}
39 |
40 |
--------------------------------------------------------------------------------
/templates/accounts/email/base_message.txt:
--------------------------------------------------------------------------------
1 | {% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name %}Hello from {{ site_name }}!{% endblocktrans %}
2 |
3 | {% block content %}{% endblock %}
4 |
5 | {% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}!
6 | {{ site_domain }}{% endblocktrans %}
7 | {% endautoescape %}
8 |
--------------------------------------------------------------------------------
/templates/accounts/email/email_confirmation_message.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drmacsika/fastapi-django-combo/3025332d87a8da1ef13bfd7c6e27d23c9b4af685/templates/accounts/email/email_confirmation_message.html
--------------------------------------------------------------------------------
/templates/accounts/email/email_confirmation_message.txt:
--------------------------------------------------------------------------------
1 | {% extends "accounts/email/base_message.txt" %}
2 | {% load account %}
3 | {% load i18n %}
4 |
5 | {% block content %}{% autoescape off %}{% user_display user as user_display %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Accounts - You're receiving this e-mail because user {{ user_display }} has given your e-mail address to register an account on {{ site_domain }}.
6 |
7 | To confirm this is correct, go to {{ activate_url }}{% endblocktrans %}{% endautoescape %}{% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/email/email_confirmation_signup_message.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drmacsika/fastapi-django-combo/3025332d87a8da1ef13bfd7c6e27d23c9b4af685/templates/accounts/email/email_confirmation_signup_message.html
--------------------------------------------------------------------------------
/templates/accounts/email/email_confirmation_signup_message.txt:
--------------------------------------------------------------------------------
1 | {% include "accounts/email/email_confirmation_message.txt" %}
2 |
--------------------------------------------------------------------------------
/templates/accounts/email/email_confirmation_signup_subject.txt:
--------------------------------------------------------------------------------
1 | {% include "accounts/email/email_confirmation_subject.txt" %}
2 |
--------------------------------------------------------------------------------
/templates/accounts/email/email_confirmation_subject.txt:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% autoescape off %}
3 | {% blocktrans %}Please Confirm Your E-mail Address{% endblocktrans %}
4 | {% endautoescape %}
--------------------------------------------------------------------------------
/templates/accounts/email/password_reset_key_message.txt:
--------------------------------------------------------------------------------
1 | {% extends "accounts/email/base_message.txt" %}
2 | {% load i18n %}
3 |
4 | {% block content %}{% autoescape off %}{% blocktrans %}Yippe Yada Yada! You're receiving this e-mail because you or someone else has requested a password for your user account.
5 | It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}
6 |
7 | {{ password_reset_url }}{% if username %}
8 |
9 | {% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}{% endif %}{% endautoescape %}{% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/email/password_reset_key_subject.txt:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% autoescape off %}
3 | {% blocktrans %}Password Reset E-mail{% endblocktrans %}
4 | {% endautoescape %}
5 |
--------------------------------------------------------------------------------
/templates/accounts/email/verified_email_required.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 |
5 | {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
6 |
7 | {% block content %}
8 | {% trans "Verify Your E-mail Address" %}
9 |
10 | {% url 'account_email' as email_url %}
11 |
12 | {% blocktrans %}This part of the site requires us to verify that
13 | you are who you claim to be. For this purpose, we require that you
14 | verify ownership of your e-mail address. {% endblocktrans %}
15 |
16 | {% blocktrans %}We have sent an e-mail to you for
17 | verification. Please click on the link inside this e-mail. Please
18 | contact us if you do not receive it within a few minutes.{% endblocktrans %}
19 |
20 | {% blocktrans %}Note: you can still change your e-mail address.{% endblocktrans %}
21 |
22 |
23 | {% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/email_confirm.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 | {% load account %}
5 |
6 | {% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
7 |
8 |
9 | {% block content %}
10 | {% trans "Confirm E-mail Address" %}
11 |
12 | {% if confirmation %}
13 |
14 | {% user_display confirmation.email_address.user as user_display %}
15 |
16 | {% blocktrans with confirmation.email_address.email as email %}Please confirm that {{ email }} is an e-mail address for user {{ user_display }}.{% endblocktrans %}
17 |
18 |
22 |
23 | {% else %}
24 |
25 | {% url 'account_email' as email_url %}
26 |
27 | {% blocktrans %}This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request.{% endblocktrans %}
28 |
29 | {% endif %}
30 |
31 | {% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/login.html:
--------------------------------------------------------------------------------
1 | {% load custom_tags %}
2 | Log In from Accounts {{ request.path }}
3 |
4 | {% url "accounts:login" as login_url %}
5 |
10 |
11 |
14 |
15 |
16 |
17 | {% comment %}
18 | {% load custom_tags %}
19 | Log In from Accounts {% url_path request.META.HTTP_REFERER %}
20 |
26 |
27 |
30 | {% endcomment %}
--------------------------------------------------------------------------------
/templates/accounts/logout.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 |
5 | {% block head_title %}{% trans "Sign Out" %}{% endblock %}
6 |
7 | {% block content %}
8 | {% trans "Sign Out" %}
9 |
10 | {% trans 'Are you sure you want to sign out?' %}
11 |
12 |
19 |
20 |
21 | {% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/password_change.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 |
5 | {% block head_title %}{% trans "Change Password" %}{% endblock %}
6 |
7 | {% block content %}
8 | {% trans "Change Password" %}
9 |
10 |
16 | {% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/password_reset.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 | {% load account %}
5 |
6 | {% block head_title %}{% trans "Password Reset" %}{% endblock %}
7 |
8 | {% block content %}
9 |
10 | {% trans "Password Reset" %}
11 | {% if user.is_authenticated %}
12 | {% include "accounts/snippets/already_logged_in.html" %}
13 | {% endif %}
14 |
15 | {% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}
16 |
17 |
22 |
23 | {% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}
24 | {% endblock %}
25 |
--------------------------------------------------------------------------------
/templates/accounts/password_reset_done.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 | {% load account %}
5 |
6 | {% block head_title %}{% trans "Password Reset" %}{% endblock %}
7 |
8 | {% block content %}
9 | {% trans "Password Reset" %}
10 |
11 | {% if user.is_authenticated %}
12 | {% include "accounts/snippets/already_logged_in.html" %}
13 | {% endif %}
14 |
15 | {% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}
16 | {% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/password_reset_from_key.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 | {% block head_title %}{% trans "Custom Change Password" %}{% endblock %}
5 |
6 | {% block content %}
7 | {% if token_fail %}{% trans "Custom Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}
8 |
9 | {% if token_fail %}
10 | {% url 'accounts:reset_password' as passwd_reset_url %}
11 | {% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a new password reset.{% endblocktrans %}
12 | {% else %}
13 | {% if form %}
14 |
19 | {% else %}
20 | {% trans 'Your password is now changed.' %}
21 | {% endif %}
22 | {% endif %}
23 | {% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/password_reset_from_key_done.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 | {% block head_title %}{% trans "Change Password" %}{% endblock %}
5 |
6 | {% block content %}
7 | {% trans "Change Password" %}
8 | {% trans 'Your password is now changed.' %}
9 | {% endblock %}
10 |
--------------------------------------------------------------------------------
/templates/accounts/password_set.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 |
5 | {% block head_title %}{% trans "Set Password" %}{% endblock %}
6 |
7 | {% block content %}
8 | {% trans "Set Password" %}
9 |
10 |
15 | {% endblock %}
--------------------------------------------------------------------------------
/templates/accounts/registration/password_reset_email.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}{% autoescape off %}
2 | {% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %}
3 |
4 | {% translate "Please go to the following page and choose a new password:" %}
5 | {% block reset_link %}
6 | {{ protocol }}://{{ domain }}{% url 'accounts:password_reset_confirm' uidb64=uid token=token %}
7 | {% endblock %}
8 | {% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}
9 |
10 | {% translate "Thanks for using our site!" %}
11 |
12 | {% blocktranslate %Archangel {{ site_name }} team{% endblocktranslate %}
13 |
14 | {% endautoescape %}
--------------------------------------------------------------------------------
/templates/accounts/signup.html:
--------------------------------------------------------------------------------
1 | Sign Up
2 |
--------------------------------------------------------------------------------
/templates/accounts/snippets/already_logged_in.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% load account %}
3 |
4 | {% user_display user as user_display %}
5 | {% trans "Note" %}: {% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %}
6 |
--------------------------------------------------------------------------------
/templates/accounts/verification_sent.html:
--------------------------------------------------------------------------------
1 | {% extends "accounts/base.html" %}
2 |
3 | {% load i18n %}
4 |
5 | {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
6 |
7 | {% block content %}
8 | {% trans "Verify Your E-mail Address" %}
9 |
10 | {% blocktrans %}Are you There? We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}
11 |
12 | {% endblock %}
--------------------------------------------------------------------------------
/templates/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% block head_title %}{% endblock %}
5 | {% block extra_head %}
6 | {% endblock %}
7 |
8 |
9 | {% block body %}
10 |
11 | {% if messages %}
12 |
13 |
Messages:
14 |
15 | {% for message in messages %}
16 | - {{message}}
17 | {% endfor %}
18 |
19 |
20 | {% endif %}
21 |
22 |
34 | {% block content %}
35 | {% endblock %}
36 | {% endblock %}
37 | {% block extra_body %}
38 | {% endblock %}
39 |
40 |
--------------------------------------------------------------------------------
/templates/pages/about.html:
--------------------------------------------------------------------------------
1 |
8 |
9 | {% if user.is_authenticated %}
10 | Hi {{ user.email }}!
11 | Log Out
12 | {% else %}
13 | You are not logged in
14 | Log In |
15 | Sign Up
16 | {% endif %}
--------------------------------------------------------------------------------
/templates/pages/home.html:
--------------------------------------------------------------------------------
1 |
8 |
9 | {% if user.is_authenticated %}
10 | Hi {{ user.email }}!
11 | Log Out
12 | {% else %}
13 | You are not logged in
14 | Log In |
15 | Sign Up
16 | {% endif %}
--------------------------------------------------------------------------------