need to fix automatical true assignment(you automatically get approved)

This commit is contained in:
Yamozha 2021-03-11 19:19:48 +02:00
parent 94ea7ecce9
commit c1d7b01e4e
53 changed files with 763 additions and 40 deletions

Binary file not shown.

View File

@ -3504,3 +3504,5 @@ input, select, textarea {
} }
} }

View File

@ -1,10 +1,26 @@
from django.shortcuts import render from django.shortcuts import render
import os.path import os.path
from users.models import Balance
def homePage(request): def homePage(request):
currencyTotal = open(os.path.dirname(__file__) + "/../currency.txt","r") iter_var = 0
currencyTotal = currencyTotal.readline() all_balance = []
try:
a = Balance.objects.all()
for user in a:
all_balance.append(user.balanceValue)
print(f"{all_balance}")
context = { context = {
"currencyTotal" : currencyTotal "currencyTotal":sum(all_balance)
} }
return render(request, "home.html", context) return render(request, "home.html", context)
except Exception as e:
context = {
"currencyTotal":e
}
return render(request, "home.html", context)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

27
reValuate/micro Normal file
View File

@ -0,0 +1,27 @@
[?1049h[>4;2m[?1h=[?2004h[?1004h[?12h[?12l[?25lE325: ATTENTION
Found a swap file by the name "~/github/reValuate/.git/.COMMIT_EDITMSG.swp"
owned by: gang420 dated: Thu Mar 11 03:38:41 2021
file name: ~gang420/github/reValuate/.git/COMMIT_EDITMSG
modified: YES
user name: gang420 host name: CatShip
process ID: 22317
While opening file "/home/gang420/github/reValuate/.git/COMMIT_EDITMSG"
dated: Thu Mar 11 03:38:56 2021
NEWER than swap file!
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /home/gang420/github/reValuate/.
git/COMMIT_EDITMSG"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/home/gang420/github/reValuate/.
git/.COMMIT_EDITMSG.swp"
to avoid this message.
Swap file "~/github/reValuate/.git/.COMMIT_EDITMSG.swp" already exists!
-- More --[?25h[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort: 
Interrupt: Press ENTER or type command to continue[?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 0,0-1All[?25h[?1004l[?2004l[?1l>[>4;m[?1049lVim: Caught deadly signal HUP
Vim: Finished.


View File

@ -3,17 +3,13 @@
{% block title %} Update Balance {% endblock %} {% block title %} Update Balance {% endblock %}
{% if user.is_superuser %}
{% block content %} {% block content %}
<div class="centered"> <div class="centered">
{% if message is None %}
{% if request.user.is_superuser %}
<p>Hello, {{ user.username }} !</p> <p>Hello, {{ user.username }} !</p>
{% else %}
<p>{{ message }}</p>
{% endif %}
<form method="post" enctype="multipart/form-data"> <form method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
@ -21,7 +17,7 @@
<input name="tokens", id="tokens", placeholder="523..."> <input name="tokens", id="tokens", placeholder="523...">
<button type="submit">Upload</button> <button type="submit">Upload</button>
</form> </form>
{% endblock %}
{% else %} {% else %}
@ -30,4 +26,4 @@
</div> </div>
{% endif %} {% endif %}
{% endblock %}

View File

@ -0,0 +1,77 @@
{% extends 'base.html' %}
{% block optionalParams %}
<style>
.choiceButtons{
position: absolute;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
top: 80%;
bottom: 20%;
}
.choice{
border:5px;
border-color: #4CAF50;
border-style: dashed;
}
.emoji {
font-size: 40px;
display: inline-block;
animation:
color .66s linear infinite,
rotate 1s ease-in-out infinite;
&:nth-child(2) { animation-delay: -.66s; }
&:nth-child(3) { animation-delay: -1.33s; }
}
@keyframes color {
50% { filter: hue-rotate(360deg); }
}
@keyframes rotate {
0%, 100% { transform: rotate(20deg); }
25% { transform: scale(1.1); }
50% { transform: rotate(-20deg); }
75% { transform: scale(.9); }
}
</style>
{% endblock %}
{% block content %}
<div class="centered">
{% if image %}
<form method="post">
{% csrf_token %}
<div class="choice">
<img src="/media/{{ image }}" width="500" width="500" >
</div><br>
</div>
<div class="choiceButtons">
<input type="submit" value="Valid">
<input type="submit" value="Invalid">
</form>
{% else %}
<h1>Congratulations, there is no work left</h1>
<div class="choiceButtons">
<h1 class="emoji">🎉</h1>
<h1 class="emoji">🥳</h1>
<h1 class="emoji">🎉</h1>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -0,0 +1,27 @@
# Generated by Django 3.1.6 on 2021-03-11 15:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('upload', '0003_delete_balance'),
]
operations = [
migrations.AlterModelOptions(
name='image',
options={'verbose_name': 'image', 'verbose_name_plural': 'images'},
),
migrations.AddField(
model_name='image',
name='tokenized',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='videos',
name='tokenized',
field=models.BooleanField(default=False),
),
]

View File

@ -0,0 +1,23 @@
# Generated by Django 3.1.6 on 2021-03-11 16:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('upload', '0004_auto_20210311_1702'),
]
operations = [
migrations.AddField(
model_name='image',
name='reason',
field=models.CharField(default=None, max_length=120),
),
migrations.AddField(
model_name='videos',
name='reason',
field=models.CharField(default=None, max_length=120),
),
]

View File

@ -0,0 +1,23 @@
# Generated by Django 3.1.6 on 2021-03-11 16:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('upload', '0005_auto_20210311_1833'),
]
operations = [
migrations.AlterField(
model_name='image',
name='reason',
field=models.CharField(blank=True, default=None, max_length=120, null=True),
),
migrations.AlterField(
model_name='videos',
name='reason',
field=models.CharField(blank=True, default=None, max_length=120, null=True),
),
]

View File

@ -0,0 +1,23 @@
# Generated by Django 3.1.6 on 2021-03-11 16:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('upload', '0006_auto_20210311_1833'),
]
operations = [
migrations.AlterField(
model_name='image',
name='reason',
field=models.CharField(blank=True, max_length=120, null=True),
),
migrations.AlterField(
model_name='videos',
name='reason',
field=models.CharField(blank=True, max_length=120, null=True),
),
]

View File

@ -0,0 +1,23 @@
# Generated by Django 3.1.6 on 2021-03-11 16:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('upload', '0007_auto_20210311_1834'),
]
operations = [
migrations.AlterField(
model_name='image',
name='reason',
field=models.CharField(max_length=120),
),
migrations.AlterField(
model_name='videos',
name='reason',
field=models.CharField(max_length=120),
),
]

View File

@ -0,0 +1,26 @@
# Generated by Django 3.1.6 on 2021-03-11 17:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('upload', '0008_auto_20210311_1838'),
]
operations = [
migrations.AlterField(
model_name='image',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='videos',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]

View File

@ -18,21 +18,23 @@ def videosPath(instance,filename):
return f"videos/{instance.user.id}/{filename}" return f"videos/{instance.user.id}/{filename}"
class Image(models.Model): class Image(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, blank=True, null=True) user = models.ForeignKey(User, on_delete=models.CASCADE, blank=True, null=True)
# title = models.CharField(max_length=200)
image = models.ImageField(upload_to=imagesPath,validators=[imageValidate]) image = models.ImageField(upload_to=imagesPath,validators=[imageValidate])
tokenized = models.BooleanField(default=False)
reason = models.CharField(max_length=120)
# def __str__(self): class Meta:
# return self.title verbose_name = 'image'
verbose_name_plural = 'images'
class Videos(models.Model): class Videos(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, blank=True, null=True) user = models.ForeignKey(User, on_delete=models.CASCADE, blank=True, null=True)
# title = models.CharField(max_length=100)
video = models.FileField(upload_to=videosPath, validators=[videoValidate]) video = models.FileField(upload_to=videosPath, validators=[videoValidate])
tokenized = models.BooleanField(default=False)
reason = models.CharField(max_length=120)
class Meta: class Meta:
verbose_name = 'video' verbose_name = 'video'
verbose_name_plural = 'videos' verbose_name_plural = 'videos'
# def __str__(self):
# return self.title

View File

@ -54,6 +54,7 @@ def videoUpload(request):
form = VideoForm() form = VideoForm()
return render(request, 'uploadVideo.html', {'form': form}) return render(request, 'uploadVideo.html', {'form': form})
def viewMedia(request): def viewMedia(request):
path = settings.MEDIA_ROOT path = settings.MEDIA_ROOT
img_list = os.listdir(path + f"images/{request.user.id}/") img_list = os.listdir(path + f"images/{request.user.id}/")
@ -62,3 +63,4 @@ def viewMedia(request):
"id":request.user.id, "id":request.user.id,
} }
return render (request, 'showAllImage.html', context) return render (request, 'showAllImage.html', context)

View File

@ -0,0 +1,89 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.app {
position: relative;
width: 100%;
height: 100vh;
overflow: hidden;
}
.card {
width: 300px;
height: 400px;
position: absolute;
border-radius: 10px;
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
transform-origin: center;
margin-top: auto;
margin-bottom: auto;
top: 0;
bottom: 0;
cursor: -webkit-grab;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: perspective(800px);
transform: perspective(800px);
}
.color0 {
background-image: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
}
.color1 {
background-image: linear-gradient(
to top,
#3f51b1 0%,
#5a55ae 13%,
#7b5fac 25%,
#8f6aae 38%,
#a86aa4 50%,
#cc6b8e 62%,
#f18271 75%,
#f3a469 87%,
#f7c978 100%
);
}
.color2 {
background-image: linear-gradient(
to top,
#dbdcd7 0%,
#dddcd7 24%,
#e2c9cc 30%,
#e7627d 46%,
#b8235a 59%,
#801357 71%,
#3d1635 84%,
#1c1a27 100%
);
}
.color3 {
background-image: linear-gradient(to top, #0250c5 0%, #d43f8d 100%);
}
.color4 {
background-image: linear-gradient(to top, #c7eafd 0%, #e8198b 100%);
}
.text {
text-align: center;
font-family: "Montserrat", sans-serif;
font-size: 28px;
font-weight: 900;
font-style: italic;
margin-top: 50px;
color: #fff;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

View File

@ -0,0 +1,343 @@
class Card extends React.Component {
constructor(props) {
super(props);
this.state = {
active: false,
move: false,
limit: false,
mouseStartPosX: null,
mouseStartPosY: null,
mouseCurrPosX: null,
mouseCurrPosY: null,
Posx: null,
Posy: null,
k: 0.2,
restX: 0,
restY: 0,
fx: 0,
fy: 0,
ax: 0,
ay: 0,
vx: 0.0,
vy: 0.0,
mass: 0.7,
damping: 0.8
};
this.handleDown = this.handleDown.bind(this);
this.handleUp = this.handleUp.bind(this);
this.handleMove = this.handleMove.bind(this);
this.animate = this.animate.bind(this);
this.updateCard = this.updateCard.bind(this);
this.handleTouchStart = this.handleTouchStart.bind(this);
this.handleTouchEnd = this.handleTouchEnd.bind(this);
this.handleTouchMove = this.handleTouchMove.bind(this);
}
componentDidMount() {
this.animate();
}
handleDown(e) {
this.setState({
move: true,
active: true,
mouseStartPosX: e.clientX,
mouseStartPosY: e.clientY
});
}
handleTouchStart(e) {
e.persist();
this.setState({
move: true,
active: true,
mouseStartPosX: e.touches[0].screenX,
mouseStartPosY: e.touches[0].screenY
});
console.log(this.state.mouseStartPosX);
}
handleMove(e) {
if (!this.state.limit) {
if (this.state.move) {
let mouseCurrPosX = e.clientX;
let mouseCurrPosY = e.clientY;
let Posx = mouseCurrPosX - this.state.mouseStartPosX;
let Posy = mouseCurrPosY - this.state.mouseStartPosY;
let el = document.getElementById("card" + this.props.no);
let height = window.innerHeight;
let width = window.innerWidth;
let maxX = width - width * 20 / 100;
function map_range(value, low1, high1, low2, high2) {
return low2 + (high2 - low2) * (value - low1) / (high1 - low1);
}
let mouseRange = mouseCurrPosX;
if (mouseRange < width / 2) {
mouseRange = width - mouseRange;
}
let damping = map_range(
mouseRange,
width / 2,
width - width * 10 / 100,
0.6,
0.8
);
this.setState({
Posx,
Posy,
damping,
mouseCurrPosX,
mouseCurrPosY
});
if (mouseCurrPosX > width - width * 20 / 100) {
let restX, restY;
if (mouseCurrPosX > width / 2) {
restX = this.state.Posx * 5;
} else {
restX = -this.state.Posx * 5;
}
if (mouseCurrPosY > height / 2) {
restY = this.state.Posy * 5;
} else {
restY = this.state.Posy * 5;
}
let limit = true;
let move = false;
let damping = 0.06;
this.setState(
{
restX,
restY,
limit,
move,
damping
},
() => {
setTimeout(() => {
window.cancelAnimationFrame(this.animate);
}, 10);
}
);
} else if (mouseCurrPosX < width * 20 / 100) {
let restX, restY;
if (mouseCurrPosX > width / 2) {
restX = -this.state.Posx * 5;
} else {
restX = this.state.Posx * 5;
}
if (mouseCurrPosY > height / 2) {
restY = this.state.Posy * 5;
} else {
restY = this.state.Posy * 5;
}
let limit = true;
let move = false;
let damping = 0.06;
this.setState({
restX,
restY,
limit,
move,
damping
});
}
}
}
}
handleTouchMove(e) {
e.persist();
if (!this.state.limit) {
if (this.state.move) {
let mouseCurrPosX = e.touches[0].screenX;
let mouseCurrPosY = e.touches[0].screenY;
let Posx = mouseCurrPosX - this.state.mouseStartPosX;
let Posy = mouseCurrPosY - this.state.mouseStartPosY;
let el = document.getElementById("card" + this.props.no);
let height = window.innerHeight;
let width = window.innerWidth;
let maxX = width - width * 20 / 100;
function map_range(value, low1, high1, low2, high2) {
return low2 + (high2 - low2) * (value - low1) / (high1 - low1);
}
let mouseRange = mouseCurrPosX;
if (mouseRange < width / 2) {
mouseRange = width - mouseRange;
}
let damping = map_range(
mouseRange,
width / 2,
width - width * 10 / 100,
0.6,
0.8
);
this.setState({
Posx,
Posy,
damping,
mouseCurrPosX,
mouseCurrPosY
});
if (mouseCurrPosX > width - width * 10 / 100) {
let restX, restY;
if (mouseCurrPosX > width / 2) {
restX = this.state.Posx * 5;
} else {
restX = -this.state.Posx * 5;
}
if (mouseCurrPosY > height / 2) {
restY = this.state.Posy * 5;
} else {
restY = this.state.Posy * 5;
}
let limit = true;
let move = false;
let damping = 0.08;
this.setState(
{
restX,
restY,
limit,
move,
damping
},
() => {
setTimeout(() => {
window.cancelAnimationFrame(this.animate);
}, 10);
}
);
} else if (mouseCurrPosX < width * 10 / 100) {
let restX, restY;
if (mouseCurrPosX > width / 2) {
restX = -this.state.Posx * 5;
} else {
restX = this.state.Posx * 5;
}
if (mouseCurrPosY > height / 2) {
restY = this.state.Posy * 5;
} else {
restY = this.state.Posy * 5;
}
let limit = true;
let move = false;
let damping = 0.08;
this.setState({
restX,
restY,
limit,
move,
damping
});
}
}
}
}
handleUp() {
this.setState({
move: false
});
}
handleTouchEnd() {
this.setState({
move: false
});
}
updateCard() {
if (!this.state.move) {
this.setState(
{
fx: -this.state.k * (this.state.Posx - this.state.restX),
fy: -this.state.k * (this.state.Posy - this.state.restY)
},
() => {
this.setState(
{
ax: this.state.fx / this.state.mass,
ay: this.state.fy / this.state.mass
},
() => {
this.setState(
{
vx: this.state.damping * (this.state.vx + this.state.ax),
vy: this.state.damping * (this.state.vy + this.state.ay)
},
() => {
this.setState({
Posx: this.state.Posx + this.state.vx,
Posy: this.state.Posy + this.state.vy
});
}
);
}
);
}
);
}
}
animate() {
let el = document.getElementById("card" + this.props.no);
if (
this.state.Posx > window.innerWidth + 400 ||
this.state.Posx < -window.innerWidth - 400
) {
cancelAnimationFrame(this.animate);
} else {
requestAnimationFrame(this.animate);
}
if (this.state.active) {
el.style.transform =
"translate(" +
this.state.Posx +
"px" +
"," +
this.state.Posy +
"px) rotate(" +
this.state.Posx / 9 +
"deg) perspective(800px)";
this.updateCard();
}
}
render() {
return (
<div
id={"card" + this.props.no}
className={"card color" + this.props.no}
onMouseDown={this.handleDown}
onMouseMove={this.handleMove}
onMouseUp={this.handleUp}
onMouseLeave={this.handleUp}
onTouchStart={this.handleTouchStart}
onTouchMove={this.handleTouchMove}
onTouchEnd={this.handleTouchEnd}
>
<div className="text">DRAG THE CARD LEFT OR RIGHT</div>
</div>
);
}
}
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
data: [0, 1, 2, 3, 4]
};
}
render() {
var box = this.state.data.map((item, i) => {
return <Card key={i} no={i} />;
});
return <div className="app">{box}</div>;
}
}
ReactDOM.render(<App />, document.getElementById("app"));

View File

@ -5,6 +5,7 @@ from .models import Balance
from django.shortcuts import render, redirect, get_object_or_404 from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.contrib import messages from django.contrib import messages
from upload.models import Image, Videos
# need to make oauth facebook login # need to make oauth facebook login
class SignUpView(generic.CreateView): class SignUpView(generic.CreateView):
@ -52,6 +53,7 @@ def removeBalance(request):
return render(request,"getBalance.html", {"userBalance":balAdd}) return render(request,"getBalance.html", {"userBalance":balAdd})
else: else:
return render(request,"removeBalance.html") return render(request,"removeBalance.html")
def getBalance(request): def getBalance(request):
balObject = Balance.objects.filter(user=request.user.id) balObject = Balance.objects.filter(user=request.user.id)
print(dir(balObject)) print(dir(balObject))
@ -61,3 +63,21 @@ def getBalance(request):
return render(request,"getBalance.html", {"userBalance":userBalance} ) return render(request,"getBalance.html", {"userBalance":userBalance} )
def adminView(request):
congrats = None
try:
latestPicture = Image.objects.filter(tokenized=False)
latestPicture, userId = latestPicture.values("image")[0]["image"], latestPicture.values("user_id")[0]["user_id"]
if request.method == "POST":
if request.POST.get('Valid','True'):
imageObj = Image.objects.get(image=latestPicture, user_id=userId)
imageObj.tokenized = True
imageObj.save()
return redirect("/admin/")
else:
Image.objects.get(image=latestPicture, user_id=userId).delete()
return render(request, "adminView.html", {"image":latestPicture, "userId":userId})
except IndexError:
return render(request, "adminView.html")
return render(request, "adminView.html")

View File

@ -13,6 +13,8 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
from pathlib import Path from pathlib import Path
import os import os
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
@ -137,3 +139,4 @@ EMAIL_FILE_PATH = str(BASE_DIR.joinpath('sent_emails'))
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"

View File

@ -21,10 +21,10 @@ from django.conf.urls.static import static
from django.contrib.auth import views from django.contrib.auth import views
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from upload.views import uploadContent, imageUpload, videoUpload, viewMedia from upload.views import uploadContent, imageUpload, videoUpload, viewMedia
from users.views import getBalance, addToBalance from users.views import getBalance, addToBalance, adminView
urlpatterns = [ urlpatterns = [
path("", homePage, name='home'), path("", homePage, name='home'),
path('admin/', admin.site.urls),
path("users/", include('django.contrib.auth.urls')), path("users/", include('django.contrib.auth.urls')),
path('users/', include('users.urls')), path('users/', include('users.urls')),
path("upload/", uploadContent, name="Upload"), path("upload/", uploadContent, name="Upload"),
@ -32,7 +32,8 @@ urlpatterns = [
path("upload_video/", videoUpload, name="Video"), path("upload_video/", videoUpload, name="Video"),
path("view_media/", viewMedia, name="All Media"), path("view_media/", viewMedia, name="All Media"),
path("get_balance/",getBalance, name="Balance" ), path("get_balance/",getBalance, name="Balance" ),
path("add_balance/", addToBalance, name="Add") path("add_balance/", addToBalance, name="Add"),
path("admin/", adminView, name="admin")
] ]
if settings.DEBUG: if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, urlpatterns += static(settings.MEDIA_URL,