Compare commits

..

No commits in common. "fc7a847f6dbd757b78dba4cdec1a859d6bd01655" and "713595f5e84c1d4f8ecdcaa41f1ac9d85923a484" have entirely different histories.

3 changed files with 37 additions and 68 deletions

View File

@ -45,5 +45,5 @@ class PlaceImageCreateForm(forms.ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
print(self.fields)
self.fields['filename'].required = False self.fields['filename'].required = False

View File

@ -1,20 +1,12 @@
@font-face {
font-family: Crimson;
src: url("fonts/Crimson/CrimsonText-Regular.ttf"), url("fonts/Crimson/CrimsonText-Bold.ttf"), url("fonts/Crimson/CrimsonText-Italic.ttf"); }
@font-face {
font-family: Montserrat;
src: url("fonts/Montserrat/Montserrat-Regular.otf"), url("fonts/Montserrat/Montserrat-Bold.otf"), url("fonts/Montserrat/Montserrat-Italic.otf"); }
.LP-Link { .LP-Link {
color: #565656; color: #565656;
text-decoration: none; text-decoration: none;
font-family: Montserrat, Helvetica, sans-serif; } font-family: Roboto, Arial, sans-serif; }
.LP-Link:hover { .LP-Link:hover {
color: #C09F80; } color: #C09F80; }
.LP-Link .LP-Paragraph { .LP-Link .LP-Text {
font-family: Montserrat, Helvetica, sans-serif; } font-family: Roboto, Arial, sans-serif; }
.LP-Link .LP-Paragraph:hover { .LP-Link .LP-Text:hover {
color: #C09F80; } color: #C09F80; }
.LP-Link__IconWrapper { .LP-Link__IconWrapper {
@ -229,49 +221,33 @@
.LP-TagList .LP-TagList__List .LP-TagList__Item { .LP-TagList .LP-TagList__List .LP-TagList__Item {
margin: 6px; } margin: 6px; }
.LP-Menu { .LP-Menu .LP-Menu__List {
border-left: 1px solid #C09F80; }
.LP-Menu .LP-Menu__List {
list-style-type: none; list-style-type: none;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-around; justify-content: space-between;
padding: 0; padding: 0;
margin: 0; } margin: 0; }
.LP-Menu .LP-Menu__Item {
.LP-Menu .LP-Menu__Item {
padding: 15px 0;
margin: 0; margin: 0;
width: 100px;
text-align: center; text-align: center;
background-color: transparent; } background-color: transparent; }
.LP-Menu .LP-Menu__Item .LP-Link {
display: block; .LP-Menu .LP-Link__Text {
padding: 15px 0; }
.LP-Menu .LP-Link__Text {
color: #565656; color: #565656;
font-weight: bold; font-weight: bold;
text-shadow: 0px 0px 20px white; } text-shadow: 0px 0px 20px white; }
.LP-Menu .LP-Link__Text:hover { .LP-Menu .LP-Link__Text:hover {
color: #76323F; } color: #76323F; }
.LP-Menu--sidebar {
border: none;
min-width: 80px; }
.LP-Menu--sidebar .LP-Menu__List {
flex-direction: column; }
.LP-Menu--sidebar .LP-Menu__List .LP-Menu__Item {
text-align: left;
border-left: 1px solid #C09F80;
margin-bottom: 10px; }
.LP-Menu--sidebar .LP-Menu__List .LP-Menu__Item:last-child {
margin-bottom: 0; }
.LP-Menu--sidebar .LP-Menu__List .LP-Menu__Item .LP-Link:hover {
background-color: #f9f9f9; }
@media (max-width: 750px) { @media (max-width: 750px) {
.LP-Menu:not(.LP-Menu--sidebar) .LP-Menu__List { .LP-Menu .LP-Menu__List {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; } justify-content: flex-start; } }
.LP-Menu:not(.LP-Menu--sidebar) .LP-Menu__List .LP-Menu__Item {
flex: 1 1 auto; } }
@media (max-width: 450px) { @media (max-width: 450px) {
.LP-Menu .LP-Menu__List { .LP-Menu .LP-Menu__List {
@ -283,27 +259,15 @@
justify-content: space-between; justify-content: space-between;
margin-bottom: 70px; margin-bottom: 70px;
height: 60px; } height: 60px; }
.LP-Header__Navigation {
flex-grow: 2; }
.LP-Header__Logo { .LP-Header__Logo {
height: 60px; height: 60px;
margin: 25px; margin: 25px;
object-fit: cover; object-fit: cover;
max-height: 100%; max-height: 100%;
overflow: hidden; overflow: hidden; }
flex-shrink: 0; }
.LP-Header__Logo .LP-Image { .LP-Header__Logo .LP-Image {
height: 60px; } height: 60px; }
.LP-Header__UserInformation {
margin-right: 3%; }
.LP-Header__UserInformation .LP-Paragraph {
font-family: Montserrat, Helvetica, sans-serif;
white-space: nowrap; }
.LP-Header__UserInformation .LP-Link {
margin: 0 3px;
padding: 4px 4px; }
@media (max-width: 750px) { @media (max-width: 750px) {
.LP-Header__Logo { .LP-Header__Logo {
width: 60px; } width: 60px; }
@ -448,6 +412,9 @@
.LP-HorizontalLine { .LP-HorizontalLine {
color: #565656; } color: #565656; }
.LP-Section {
clear: both; }
@media (max-width: 650px) { @media (max-width: 650px) {
.LP-MainContainer { .LP-MainContainer {
width: 100%; } } width: 100%; } }
@ -468,8 +435,7 @@
top: -15px; } top: -15px; }
.LP-PlaceOverview .LP-PlaceOverview__Info .LP-PlaceOverView__Description .LP-Headline { .LP-PlaceOverview .LP-PlaceOverview__Info .LP-PlaceOverView__Description .LP-Headline {
position: relative; position: relative;
top: 15px; top: 15px; }
margin-bottom: 30px; }
.LP-PlaceOverview .LP-PlaceOverView__ImageList { .LP-PlaceOverview .LP-PlaceOverView__ImageList {
list-style-type: none; list-style-type: none;

View File

@ -31,6 +31,7 @@ def hello_world(request):
class HomeView(View): class HomeView(View):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
place_list = Place.objects.all().order_by('submitted_when')[:10] place_list = Place.objects.all().order_by('submitted_when')[:10]
print(place_list)
context = { context = {
'place_list': place_list 'place_list': place_list
} }
@ -83,7 +84,9 @@ class PlaceCreateView(View):
} }
return render(request, 'create_place.html', context) return render(request, 'create_place.html', context)
def _apply_multipart_image_upload(self, files, place, submitter):: def _apply_multipart_image_upload(self, files, place, submitter):
print(files)
for image in files:
place_image = PlaceImage.objects.create( place_image = PlaceImage.objects.create(
filename=image, filename=image,
place=place, place=place,