Compare commits
4 Commits
feature/33
...
b876435d8c
Author | SHA1 | Date | |
---|---|---|---|
b876435d8c | |||
224eb87d76 | |||
a78f123d1f | |||
947f6520aa |
@@ -6,7 +6,7 @@ from django.db import migrations, models
|
|||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('lostplaces', '0004_auto_20201225_1702'),
|
('lostplaces', '0004_gory_fix'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
|
@@ -95,7 +95,6 @@ def auto_delete_file_on_change(sender, instance, **kwargs):
|
|||||||
old_file = Explorer.objects.get(pk=instance.pk).profile_image
|
old_file = Explorer.objects.get(pk=instance.pk).profile_image
|
||||||
except Explorer.DoesNotExist:
|
except Explorer.DoesNotExist:
|
||||||
return False
|
return False
|
||||||
print("Deleting:", old_file)
|
|
||||||
new_file = instance.profile_image
|
new_file = instance.profile_image
|
||||||
if not old_file == new_file:
|
if not old_file == new_file:
|
||||||
old_file.delete(save=False)
|
old_file.delete(save=False)
|
||||||
|
@@ -611,6 +611,12 @@ body {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap; }
|
white-space: nowrap; }
|
||||||
|
.LP-Button--fullWidth {
|
||||||
|
text-align: center; }
|
||||||
|
.LP-Button.LP-Link {
|
||||||
|
display: block; }
|
||||||
|
.LP-Button.LP-Link:hover {
|
||||||
|
color: #f9f9f9; }
|
||||||
.LP-Button:active {
|
.LP-Button:active {
|
||||||
background-color: #76323F;
|
background-color: #76323F;
|
||||||
color: #f9f9f9; }
|
color: #f9f9f9; }
|
||||||
@@ -1050,13 +1056,19 @@ body {
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-size: 25px; }
|
font-size: 25px; }
|
||||||
.LP-UserInfo__Meta {
|
.LP-UserInfo__Meta {
|
||||||
|
margin-top: 10px;
|
||||||
padding: 5px; }
|
padding: 5px; }
|
||||||
.LP-UserInfo__Meta * {
|
.LP-UserInfo__Meta * {
|
||||||
font-family: "Montserrat", Helvetica, sans-serif;
|
font-family: "Montserrat", Helvetica, sans-serif;
|
||||||
font-size: 18px; }
|
font-size: 18px; }
|
||||||
.LP-UserInfo__Meta .LP-UserInfo__Key {
|
.LP-UserInfo__Meta .LP-UserInfo__Key {
|
||||||
padding-right: 25px;
|
padding-right: 25px;
|
||||||
font-weight: bold; }
|
font-weight: bold;
|
||||||
|
white-space: nowrap; }
|
||||||
|
.LP-UserInfo__Meta .LP-UserInfo__Value {
|
||||||
|
white-space: nowrap; }
|
||||||
|
.LP-UserInfo__Edit {
|
||||||
|
margin-top: 10px; }
|
||||||
|
|
||||||
.LP-Header {
|
.LP-Header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1736,6 +1748,15 @@ body {
|
|||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
flex-basis: max-content; }
|
flex-basis: max-content; }
|
||||||
|
|
||||||
|
@media (max-width: 1000px) {
|
||||||
|
.LP-UserProfile {
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
gap: 35px; }
|
||||||
|
.LP-UserProfile__Info {
|
||||||
|
flex-basis: 100%; }
|
||||||
|
.LP-UserProfile__Info .LP-UserInfo {
|
||||||
|
max-width: unset; } }
|
||||||
|
|
||||||
.LP-MainContainer {
|
.LP-MainContainer {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 1280px; }
|
max-width: 1280px; }
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="LP-UserInfo__Value">
|
<td class="LP-UserInfo__Value">
|
||||||
<span class="LP-Paragraph">
|
<span class="LP-Paragraph">
|
||||||
<a href="{{explorer.user.email}}" class="LP-Link">{{explorer.user.email}}</a>
|
<a href="mailto:{{explorer.user.email}}" class="LP-Link">{{explorer.user.email}}</a>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -71,12 +71,10 @@
|
|||||||
<span class="LP-Paragraph">{{asset_count}}</span>
|
<span class="LP-Paragraph">{{asset_count}}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<a href="/explorer/update/"><button class="LP-Button LP-Button">{% trans 'Edit Profile' %}</button></a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
<div class="LP-UserInfo__Edit">
|
||||||
|
<a href="{% url 'explorer_profile_update' %}" class="LP-Button LP-Button--fullWidth LP-Link">{% trans 'Edit Profile' %}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -56,7 +56,6 @@ class ExplorerProfileUpdateView(IsAuthenticatedMixin, View):
|
|||||||
return render(request, 'explorer/profile_update.html', context)
|
return render(request, 'explorer/profile_update.html', context)
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
print(request.POST)
|
|
||||||
explorer_user_change_form = ExplorerUserChangeForm(
|
explorer_user_change_form = ExplorerUserChangeForm(
|
||||||
request.POST,
|
request.POST,
|
||||||
instance=request.user
|
instance=request.user
|
||||||
@@ -71,8 +70,6 @@ class ExplorerProfileUpdateView(IsAuthenticatedMixin, View):
|
|||||||
explorer_user_change_form.save()
|
explorer_user_change_form.save()
|
||||||
explorer_change_form.save()
|
explorer_change_form.save()
|
||||||
|
|
||||||
print(explorer_change_form.cleaned_data)
|
|
||||||
|
|
||||||
messages.success(
|
messages.success(
|
||||||
self.request,
|
self.request,
|
||||||
_('Successfully updated Explorer profile')
|
_('Successfully updated Explorer profile')
|
||||||
|
Reference in New Issue
Block a user