Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,30 @@
CORS_ORIGIN_WHITELIST = (
'http://localhost:3000',
'http://localhost:8000',
'http://127.0.0.1:8000'
'http://127.0.0.1:8000',
'http://127.0.0.1:3000',

'http://10.90.0.232:3000',
'http://10.90.0.232:8000',
)

CORS_ALLOW_METHODS = (
'DELETE',
'GET',
'OPTIONS',
'PATCH',
'POST',
'PUT',
)

CORS_ALLOW_HEADERS = (
'accept',
'accept-encoding',
'authorization',
'content-type',
'dnt',
'origin',
'user-agent',
'x-csrftoken',
'x-requested-with',
)
Binary file modified backend/db.sqlite3
Binary file not shown.
12 changes: 5 additions & 7 deletions backend/message/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by Django 4.1.3 on 2022-11-19 02:27
# Generated by Django 4.1.3 on 2022-11-19 17:10

import datetime
from django.db import migrations, models
import django.db.models.deletion

Expand All @@ -24,12 +23,11 @@ class Migration(migrations.Migration):
name='Text',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nickname', models.CharField(max_length=10)),
('title', models.CharField(max_length=30)),
('nickname', models.CharField(blank=True, max_length=10, null=True)),
('title', models.CharField(blank=True, max_length=30, null=True)),
('text', models.TextField()),
('email', models.EmailField(max_length=254)),
('created_at', models.DateTimeField(default=datetime.date.today, null=True)),
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='message.category')),
('email', models.CharField(blank=True, max_length=30, null=True)),
('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='message.category')),
],
),
]

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 4 additions & 1 deletion backend/message/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ class CategoryDetail(generics.RetrieveUpdateDestroyAPIView):
serializer_class = CategorySerializer
permission_classes = [IsAdminUser]
queryset = Category.objects.all()
lookup_field ='id'
lookup_field ='id'



Loading