Skip to content

Commit 714a911

Browse files
Merge pull request #34 from Web-Multi-Media/tokenauth
Add Authentication & User history
2 parents 32e0c5d + 7c35e99 commit 714a911

69 files changed

Lines changed: 5998 additions & 5194 deletions

Some content is hidden

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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,8 @@ db.sqlite3
140140
# OS files
141141
.DS_Store
142142

143+
Videos/*
144+
backend/cachefile.*
145+
146+
143147

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ install:
1111

1212
script:
1313
- docker-compose -f docker-compose-prod.yml run --rm web ./wait-for-it.sh db:5432 -- python3 manage.py test
14+
- docker-compose -f docker-compose-prod.yml run --rm web python3 -m pycodestyle --select=E302,E211,E202,E712,E225,E231 .
1415

1516
deploy:
1617
provider: script
1718
script: bash docker_push
1819
on:
19-
branch: master
20+
all_branches: true
2021

224 KB
Binary file not shown.

backend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
FROM node:8
33

4-
RUN apt-get update -y
5-
RUN apt-get install -y python3-pip python-dev build-essential \
4+
RUN apt-get update -y --allow-unauthenticated
5+
RUN apt-get install -y --allow-unauthenticated python3-pip python-dev build-essential \
66
software-properties-common python3-software-properties \
77
x264 x265 ffmpeg && rm -rf /var/lib/apt/lists/*
88

backend/StreamServerApp/admin.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
from django.contrib import admin
22
from StreamServerApp.models import Video
3-
from StreamServerApp.utils import delete_DB_Infos, populate_db_from_local_folder
3+
from StreamServerApp.database_utils import delete_DB_Infos, populate_db_from_local_folder, update_db_from_local_folder
44
from django.conf import settings
55

66

7-
def reload_video(modeladmin, request, queryset):
7+
def populate_videos(modeladmin, request, queryset):
88
delete_DB_Infos()
99
populate_db_from_local_folder(settings.VIDEO_ROOT, settings.VIDEO_URL)
10-
reload_video.short_description = "Reload videos"
10+
populate_videos.short_description = "Populate videos database"
11+
12+
13+
def update_videos(modeladmin, request, queryset):
14+
update_db_from_local_folder(settings.VIDEO_ROOT, settings.VIDEO_URL)
15+
update_videos.short_description = "Update videos database"
16+
1117

1218
class VideoAdmin(admin.ModelAdmin):
1319
actions = []
1420

21+
1522
admin.site.register(Video, VideoAdmin)
16-
admin.site.add_action(reload_video)
23+
admin.site.add_action(populate_videos)
24+
admin.site.add_action(update_videos)

0 commit comments

Comments
 (0)