-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #79 add formating for core and correct ui formating
- Loading branch information
1 parent
6170e9c
commit 0390c1c
Showing
42 changed files
with
619 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
{ | ||
"name": "Existing Docker Compose (Extend)", | ||
"name": "Existing Docker Compose (Extend)", | ||
|
||
"dockerComposeFile": ["docker-compose.yml"], | ||
"dockerComposeFile": ["docker-compose.yml"], | ||
|
||
"service": "svc", | ||
"service": "svc", | ||
|
||
"workspaceFolder": "/workspace", | ||
"workspaceFolder": "/workspace", | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"_workbench.uiExtensions": ["peterjausovec.vscode-docker"], | ||
"python.jediEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"pythonTestExplorer.testFramework": "pytest", | ||
"python.testing.autoTestDiscoverOnSaveEnabled": true, | ||
"python.pythonPath": "/usr/local/bin/python3", | ||
"python.testing.pytestPath": "/usr/local/bin/pytest", | ||
"editor.formatOnSave": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.fontFamily": "Cascadia Code, Fira Code", | ||
"[markdown]": { | ||
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint" | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"python.formatting.provider": "black", | ||
"_workbench.uiExtensions": ["peterjausovec.vscode-docker"], | ||
"python.jediEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"pythonTestExplorer.testFramework": "pytest", | ||
"python.testing.autoTestDiscoverOnSaveEnabled": true, | ||
"python.pythonPath": "/usr/local/bin/python3", | ||
"python.testing.pytestPath": "/usr/local/bin/pytest", | ||
"editor.formatOnSave": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.fontFamily": "Cascadia Code, Fira Code", | ||
"[markdown]": { | ||
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint" | ||
}, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.python" | ||
}, | ||
"grammarly.files.include": ["**/*.md", "**/*.txt"] | ||
}, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.python" | ||
}, | ||
"grammarly.files.include": ["**/*.md", "**/*.txt"] | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"github.copilot", | ||
"eamodio.gitlens", | ||
"shardulm94.trailing-spaces", | ||
"esbenp.prettier-vscode", | ||
"ms-python.python", | ||
"gruntfuggly.todo-tree", | ||
"cweijan.vscode-database-client2", | ||
"littlefoxteam.vscode-python-test-adapter", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"github.copilot", | ||
"eamodio.gitlens", | ||
"shardulm94.trailing-spaces", | ||
"esbenp.prettier-vscode", | ||
"ms-python.python", | ||
"gruntfuggly.todo-tree", | ||
"cweijan.vscode-database-client2", | ||
"littlefoxteam.vscode-python-test-adapter", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
from django.urls import path | ||
from django.urls import path | ||
from .views import EventDetail, EventList, MainList | ||
|
||
app_name = 'api' | ||
app_name = "api" | ||
|
||
urlpatterns = [ | ||
path('<int:pk>/', EventDetail.as_view(), name='detail'), | ||
path('', EventList.as_view(), name='list'), | ||
path('mainlist/', MainList.as_view(), name='detail'), | ||
|
||
path("<int:pk>/", EventDetail.as_view(), name="detail"), | ||
path("", EventList.as_view(), name="list"), | ||
path("mainlist/", MainList.as_view(), name="detail"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
from rest_framework import generics | ||
from backend.models import Event, Mainuser | ||
from .serializers import EventSerializer, MentorSerializer, MainSerializer, StudentSerializer | ||
from .serializers import ( | ||
EventSerializer, | ||
MentorSerializer, | ||
MainSerializer, | ||
StudentSerializer, | ||
) | ||
|
||
|
||
class EventList(generics.ListCreateAPIView): | ||
queryset = Event.eventobjects.all() | ||
serializer_class = EventSerializer | ||
|
||
|
||
class EventDetail(generics.RetrieveUpdateDestroyAPIView): | ||
queryset = Event.objects.all() | ||
serializer_class = EventSerializer | ||
|
||
|
||
class MainList(generics.ListCreateAPIView): | ||
queryset = Mainuser.objects.all() | ||
serializer_class = MainSerializer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
from django.contrib import admin | ||
from . import models | ||
|
||
|
||
@admin.register(models.Event) | ||
class EventAdmin(admin.ModelAdmin): | ||
list_display = ('title', 'student', 'mentor', 'start_date', 'end_date', 'status') | ||
list_filter = ('status', 'date_posted', 'start_date', 'end_date') | ||
search_fields = ('title', 'content') | ||
prepopulated_fields = {'slug': ('title',)} | ||
raw_id_fields = ('student', 'mentor') | ||
date_hierarchy = 'start_date' | ||
ordering = ('status', 'start_date') | ||
list_display = ("title", "student", "mentor", "start_date", "end_date", "status") | ||
list_filter = ("status", "date_posted", "start_date", "end_date") | ||
search_fields = ("title", "content") | ||
prepopulated_fields = {"slug": ("title",)} | ||
raw_id_fields = ("student", "mentor") | ||
date_hierarchy = "start_date" | ||
ordering = ("status", "start_date") | ||
|
||
|
||
admin.site.register(models.Category) | ||
# Register your models here. | ||
|
||
admin.site.register(models.Mainuser) | ||
|
||
admin.site.register(models.Student) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.