added the 2 points photo, 3 points video thing
This commit is contained in:
parent
d43a2d4cf2
commit
5eab487307
BIN
reValuate/api/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
reValuate/api/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
BIN
reValuate/api/__pycache__/serializers.cpython-36.pyc
Normal file
BIN
reValuate/api/__pycache__/serializers.cpython-36.pyc
Normal file
Binary file not shown.
BIN
reValuate/api/__pycache__/views.cpython-36.pyc
Normal file
BIN
reValuate/api/__pycache__/views.cpython-36.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
BIN
reValuate/media/1/1604-lubuntu-default-wallpaper-neutral.png
Normal file
BIN
reValuate/media/1/1604-lubuntu-default-wallpaper-neutral.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 688 KiB |
BIN
reValuate/media/1/CardTrooper-TF04-JP-VG.jpg
Normal file
BIN
reValuate/media/1/CardTrooper-TF04-JP-VG.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
Binary file not shown.
@ -53,7 +53,7 @@
|
||||
<source src="/media/{{ image }}" type="video/mp4">
|
||||
</video>
|
||||
{% else %}
|
||||
<img src="/media/{{ image }}" width="500" width="500" ><br>
|
||||
<img src="/media/{{ image }}" style="max-width:500px; max-height: 500px;"><br>
|
||||
{% endif %}
|
||||
</div><br>
|
||||
<p style="text-shadow: 0 0 2px #28a745; float: left;">{{time}} <p style="text-shadow: 0 0 2px #28a745; float: right;">{{date}}</p></p>
|
||||
|
@ -25,7 +25,9 @@
|
||||
</head>
|
||||
<body>
|
||||
{% block aboveNav %} {% endblock %}
|
||||
<nav class="navbar navbar-expand-lg bg-success"> <a style="color: white; font-size: 200%;" class="navbar-brand mb-0 h1" href="/"> reValuate | </a>
|
||||
<div>
|
||||
<nav class="navbar navbar-expand-lg fixed-top bg-success">
|
||||
<a style="color: white; font-size: 200%;" class="navbar-brand mb-0 h1" href="/"> reValuate | </a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#target" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="fas fa-bars" style="color:#000; font-size:28px;"></i>
|
||||
@ -71,7 +73,8 @@
|
||||
</div>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -19,7 +19,8 @@
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
<div class="centered">
|
||||
|
||||
<div class="mx-auto">
|
||||
|
||||
|
||||
{% for i in get_status reversed %}
|
||||
|
Binary file not shown.
Binary file not shown.
@ -83,17 +83,23 @@ def adminView(request):
|
||||
|
||||
if request.method == "POST":
|
||||
if request.POST['isValid'] == "Valid":
|
||||
imageObj = Media.objects.get(image=latestPicture, user_id=userId)
|
||||
|
||||
if imageObj.is_video:
|
||||
token_count = 3
|
||||
else:
|
||||
token_count = 2
|
||||
|
||||
try:
|
||||
user_instance = Balance.objects.get(user=userId)
|
||||
sum_balance = 5 + user_instance.balanceValue
|
||||
sum_balance = token_count + user_instance.balanceValue
|
||||
balAdd = Balance(balanceValue=sum_balance, user_id=user_instance)
|
||||
balAdd.save()
|
||||
print(balAdd)
|
||||
except Balance.DoesNotExist:
|
||||
balAdd = Balance(balanceValue=5, user_id=userId)
|
||||
balAdd = Balance(balanceValue=token_count, user_id=userId)
|
||||
balAdd.save()
|
||||
|
||||
imageObj = Media.objects.get(image=latestPicture, user_id=userId)
|
||||
imageObj.tokenized = True
|
||||
imageObj.managed_by = request.user.username
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user