5 Commits

6 changed files with 27 additions and 12 deletions

View File

@@ -6,7 +6,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lostplaces', '0004_auto_20201225_1702'),
('lostplaces', '0004_gory_fix'),
]
operations = [

View File

@@ -95,7 +95,6 @@ def auto_delete_file_on_change(sender, instance, **kwargs):
old_file = Explorer.objects.get(pk=instance.pk).profile_image
except Explorer.DoesNotExist:
return False
print("Deleting:", old_file)
new_file = instance.profile_image
if not old_file == new_file:
old_file.delete(save=False)

View File

@@ -611,6 +611,12 @@ body {
font-weight: bold;
cursor: pointer;
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 {
background-color: #76323F;
color: #f9f9f9; }
@@ -1050,13 +1056,19 @@ body {
padding: 5px;
font-size: 25px; }
.LP-UserInfo__Meta {
margin-top: 10px;
padding: 5px; }
.LP-UserInfo__Meta * {
font-family: "Montserrat", Helvetica, sans-serif;
font-size: 18px; }
.LP-UserInfo__Meta .LP-UserInfo__Key {
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 {
display: flex;
@@ -1736,6 +1748,15 @@ body {
flex-shrink: 1;
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 {
margin: 0 auto;
max-width: 1280px; }

View File

@@ -42,7 +42,7 @@
</td>
<td class="LP-UserInfo__Value">
<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>
</td>
{% endif %}
@@ -71,12 +71,10 @@
<span class="LP-Paragraph">{{asset_count}}</span>
</td>
</tr>
<tr>
<td>
<a href="/explorer/update/"><button class="LP-Button LP-Button">{% trans 'Edit Profile' %}</button></a>
</td>
</tr>
</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>

View File

@@ -56,7 +56,6 @@ class ExplorerProfileUpdateView(IsAuthenticatedMixin, View):
return render(request, 'explorer/profile_update.html', context)
def post(self, request, *args, **kwargs):
print(request.POST)
explorer_user_change_form = ExplorerUserChangeForm(
request.POST,
instance=request.user
@@ -71,8 +70,6 @@ class ExplorerProfileUpdateView(IsAuthenticatedMixin, View):
explorer_user_change_form.save()
explorer_change_form.save()
print(explorer_change_form.cleaned_data)
messages.success(
self.request,
_('Successfully updated Explorer profile')