Skip to content

Commit cce15ed

Browse files
committed
Frontend app is prepared for React to be installed
1 parent e66a980 commit cce15ed

File tree

12 files changed

+50
-2
lines changed

12 files changed

+50
-2
lines changed

djsr/djsr/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
'django.contrib.messages',
4141
'django.contrib.staticfiles',
4242
'authentication',
43-
'rest_framework'
43+
'rest_framework',
44+
'frontend'
4445
]
4546

4647
MIDDLEWARE = [

djsr/djsr/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818

1919
urlpatterns = [
2020
path('admin/', admin.site.urls),
21-
path('api/', include('authentication.urls'))
21+
path('api/', include('authentication.urls')),
22+
path('', include('frontend.urls'))
2223
]

djsr/frontend/__init__.py

Whitespace-only changes.

djsr/frontend/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

djsr/frontend/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class FrontendConfig(AppConfig):
5+
name = 'frontend'

djsr/frontend/migrations/__init__.py

Whitespace-only changes.

djsr/frontend/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#root{
2+
background-color:rebeccapurple;
3+
color:white;
4+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
{% load static %}
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="{% static 'frontend/style.css' %}">
8+
<title>DRF + React = Winning the game</title>
9+
</head>
10+
<body>
11+
<div id="root" class="content">
12+
This will be the base template.
13+
</div>
14+
</body>
15+
</html>

djsr/frontend/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

0 commit comments

Comments
 (0)