-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes
More file actions
34 lines (24 loc) · 743 Bytes
/
Copy pathNotes
File metadata and controls
34 lines (24 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#libraries used
social-auth-app-django
django
django-markdownx
#Sign-in
Add stuff from social-auth page
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = ‘’
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = ''
LOGIN_REDIRECT_URL = '/#'
<a href="{% url 'social:begin' 'google-oauth2' %}?next={{ request.path }}">Login with Google</a>
#Markdown
Install and configure as mentioned at django-markdownx
In views:
from markdownx.utils import markdownify
post.text = markdownify(post.text)
In post_detail template:
{{post.text | safe}} to allow HTML tags to be rendered.
#TO-DO
https://djangogirls.gitbooks.io/django-girls-tutorial-extensions/homework_create_more_models/
Changes:
*New post redirect ,fixed
*markdown instructions, done
*delete post, done
*contact, left