image upload to azure
This commit is contained in:
parent
cc13e9666d
commit
510bfdb982
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"python.pythonPath": "C:\\Python39\\python.exe"
|
||||
"python.pythonPath": "C:\\Users\\bncha\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
padding: 10px;
|
||||
}
|
|
@ -5,9 +5,9 @@
|
|||
<head>
|
||||
<a href="index.html"><title>{% block title %}Auctions{% endblock %}</title></a>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<link href="{% static 'auctions/styles.css' %}" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body style="padding: 10px">
|
||||
<a href="{% url 'index' %}" style = "color:inherit;text-decoration: none;"><h1>Auctions</h1></a>
|
||||
<div class = "text-right" style = "align-self: flex-end;">
|
||||
{% if user.is_authenticated %}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<a href="listing/{{ listing.title}}" style = "color:inherit;text-decoration: none;">
|
||||
<div class="card border-light" style="width: 18rem;">
|
||||
<div class="shadow p-2 mb-2 bg-white rounded">
|
||||
<img class="card-img-top" src="{{ listing.picture }}" alt="Preview not found">
|
||||
<img class="card-img-top" src="{{ listing.picture.url }}" alt="Preview not found">
|
||||
|
||||
<hr>
|
||||
<div class="card-body">
|
||||
|
|
Binary file not shown.
|
@ -129,4 +129,9 @@ STATICFILES_DIRS = [
|
|||
os.path.join(BASE_DIR, 'auctions/static'),
|
||||
]
|
||||
|
||||
|
||||
STATICFILES_STORAGE = 'storages.backends.azure_storage.AzureStorage'
|
||||
STATIC_LOCATION = "static"
|
||||
DEFAULT_FILE_STORAGE = 'storages.backends.azure_storage.AzureStorage'
|
||||
AZURE_ACCOUNT_NAME = 'auctionimages'
|
||||
AZURE_ACCOUNT_KEY = '3W/fel22r8ExgQMDr8KOxxklp80/slPtAznb+G1Hkq0DWuX2bOIXnQMpgmU/BIJdIWnbDsgMr2SbC5l9qfJJ6g=='
|
||||
AZURE_CONTAINER = 'media'
|
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
Loading…
Reference in New Issue