Skip to content

Commit

Permalink
modify: Upgrade to Django 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Keda87 committed Feb 29, 2020
1 parent 059ec1e commit 6e3156e
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 48 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
djangoid/settings.py
.idea/*
.vscode/*
.DS_Store
venv
db.sqlite3


# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 1 addition & 1 deletion app_author/templates/app_author/author_single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load humanize %}
{% load crispy_forms_tags %}
{% load show_markdown %}
{% load staticfiles %}
{% load static %}
{% block content %}

<div class="dj-author-single-wrapper">
Expand Down
40 changes: 20 additions & 20 deletions app_author/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def test_author_edit_view(self):
)
url = reverse('author:author_edit', args=[user.profile.slug])
payload = {
'profile_picture': None,
'profile_picture': '',
'profile_name': 'Adit',
'profile_email': '[email protected]',
'profile_location': None,
'profile_location': '',
'profile_github': 'https://github.com/keda87',
}

Expand All @@ -45,24 +45,24 @@ def test_author_edit_view(self):
response, reverse('author:author_single', args=[user.profile.slug])
)

# def test_author_edit_view_form_with_another_user(self):
# user = User.objects.create_user(
# username='john',
# email='[email protected]',
# password='testing123',
# )
# another_user = User.objects.create_user(
# username='stranger',
# email='[email protected]',
# password='testing123',
# )
#
# url = reverse('author:author_edit', args=[user.profile.slug])
# request = self.factory.get(path=url)
# request.user = another_user
# response = author_edit_view(request, user.profile.slug)
# response.client = Client()
# self.assertRedirects(response, reverse('forum:forum_list'))
def test_author_edit_view_form_with_another_user(self):
user = User.objects.create_user(
username='john',
email='[email protected]',
password='testing123',
)
another_user = User(
username='stranger',
email='[email protected]',
password='testing123',
)

url = reverse('author:author_edit', args=[user.profile.slug])
request = self.factory.get(path=url)
request.user = another_user
response = author_edit_view(request, user.profile.slug)
response.client = Client()
self.assertRedirects(response, reverse('forum:forum_list'))

def test_author_edit_view_form(self):
user = User.objects.create_user(
Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/main/forum_base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/main/forum_comment_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load humanize %}
{% load crispy_forms_tags %}
{% load show_markdown %}
{% load staticfiles %}
{% load static %}
{% block content %}
{{ form.media }}

Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/main/forum_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "app_forum/main/forum_base.html" %}
{% block title %}Django Indonesia{% endblock %}
{% load staticfiles %}
{% load static %}
{% load humanize %}
{% block content %}

Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/main/forum_single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% load crispy_forms_tags %}
{% load socialaccount %}
{% load show_markdown %}
{% load staticfiles %}
{% load static %}
{% block content %}
{{ form.media }}

Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/partials/_doodle.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<div class="title-with-icons">
<svg width="1188px" height="219px" viewBox="0 0 1188 219" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/partials/_footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<footer class="footer">
<div class="container">
<div class="content has-text-centered dj-footer-wrapper">
Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/partials/_header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
<!-- SEO -->
<meta charset="UTF-8">
<meta name="description" content="Komunitas Django Framework Indonesia. Tempat sharing dan diskusi seputar web development menggunakan Django Web Framework">
Expand Down
2 changes: 1 addition & 1 deletion app_forum/templates/app_forum/partials/_navbar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load account %}
{% load socialaccount %}
{% load staticfiles %}
{% load static %}
<div class="dj-navbar-wrapper">
<div class="container">
<nav class="navbar is-transparent" role="navigation" aria-label="main navigation">
Expand Down
25 changes: 6 additions & 19 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
certifi==2017.7.27.1
chardet==3.0.4
defusedxml==0.5.0
Django==2.2.10
django-allauth==0.33.0
Django==3.0.3
django-allauth==0.41.0
django-autoslug==1.9.3
django-crispy-forms==1.7.0
django-markdownx==2.0.22
django-taggit==0.22.1
idna==2.6
Markdown==2.6.9
oauthlib==2.0.4
olefile==0.44
Pillow==6.2.0
Pygments==2.2.0
python3-openid==3.1.0
pytz==2017.3
requests==2.20.0
requests-oauthlib==0.8.0
urllib3==1.24.2
django-crispy-forms==1.8.1
django-markdownx==3.0.1
django-taggit==1.2.0
Pillow==7.0.0
coverage==4.4.1

0 comments on commit 6e3156e

Please sign in to comment.