Skip to content

Commit 06ff8fe

Browse files
Merge pull request #5 from SushritPasupuleti/Development
Admin Dashboard Added
2 parents c52c61e + 790b1d7 commit 06ff8fe

File tree

62 files changed

+301
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+301
-5
lines changed

braggi-reactjs-frontend/backend/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ postMessage = (message, author) => {
2626
data = {author : "Braggi", message : response.data.braggi_out}
2727
io.emit('RECEIVE_MESSAGE', data);
2828
})
29+
.catch(function(err){
30+
console.log(err);
31+
})
2932
}
3033

3134
io.on('connection', (socket) => {
97 Bytes
Binary file not shown.
43 Bytes
Binary file not shown.

braggi-rest-api/braggi_rest_api/braggi_rest_api/settings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
# SECURITY WARNING: don't run with debug turned on in production!
2626
DEBUG = True
2727

28-
ALLOWED_HOSTS = ['192.168.56.1','192.168.1.94', '127.0.0.1']
28+
ALLOWED_HOSTS = ['192.168.56.1','192.168.1.94', '127.0.0.1', 'null']
2929

3030
CORS_ORIGIN_WHITELIST = (
3131
'192.168.56.1:3000',
3232
'localhost:3000',
33+
'localhost:5000',
3334
'192.168.1.94:3000'
3435
)
3536

@@ -45,6 +46,8 @@
4546

4647
'corsheaders',
4748
'rest_api',
49+
'dashboard',
50+
'djoser',
4851
'rest_framework',
4952
]
5053

@@ -129,3 +132,5 @@
129132
# https://docs.djangoproject.com/en/2.0/howto/static-files/
130133

131134
STATIC_URL = '/static/'
135+
136+
LOGIN_REDIRECT_URL = '/api-admin/'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Login</title>
5+
</head>
6+
<body>
7+
<h2>Login</h2>
8+
<form method="post">
9+
{% csrf_token %}
10+
{{ form.as_p }}
11+
<button type="submit">Login</button>
12+
</form>
13+
</body>
14+
</html>

braggi-rest-api/braggi_rest_api/braggi_rest_api/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020

2121
urlpatterns = [
2222
url(r'^', include('rest_api.urls')),
23-
]
23+
url(r'^api-admin/', include('dashboard.urls'))
24+
]

braggi-rest-api/braggi_rest_api/dashboard/__init__.py

Whitespace-only changes.
258 Bytes
Binary file not shown.
299 Bytes
Binary file not shown.
296 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)