Skip to content

Commit

Permalink
Merge pull request #118 from app-generator/issue-v1
Browse files Browse the repository at this point in the history
Fix footer delimiter and empty value issue
  • Loading branch information
mominur-helios authored Mar 21, 2024
2 parents 7ad7c6a + 25471e2 commit 3d2bb40
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 48 deletions.
Binary file modified db.sqlite3
Binary file not shown.
75 changes: 40 additions & 35 deletions home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,26 @@ def general_settings(request):
for attribute, value in request.POST.items():
if attribute == 'csrfmiddlewaretoken':
continue

Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value': value
}
)

if value:
Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value': value
}
)

for attribute, value in request.FILES.items():
if attribute == 'csrfmiddlewaretoken':
continue

Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'file': value
}
)

if value:
Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'file': value
}
)

return redirect(request.META.get('HTTP_REFERER'))

Expand Down Expand Up @@ -178,13 +180,14 @@ def social_settings(request):
for attribute, value in request.POST.items():
if attribute == 'csrfmiddlewaretoken':
continue

Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value': value
}
)

if value:
Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value': value
}
)
return redirect(request.META.get('HTTP_REFERER'))

context = {
Expand All @@ -206,13 +209,14 @@ def privacy_settings(request):
for attribute, value in request.POST.items():
if attribute == 'csrfmiddlewaretoken':
continue

Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value_html': value
}
)

if value:
Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value_html': value
}
)
return redirect(request.META.get('HTTP_REFERER'))

context = {
Expand All @@ -234,13 +238,14 @@ def terms_settings(request):
for attribute, value in request.POST.items():
if attribute == 'csrfmiddlewaretoken':
continue

Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value_html': value
}
)

if value:
Settings.objects.update_or_create(
type=TypeChocies[attribute],
defaults={
'value_html': value
}
)
return redirect(request.META.get('HTTP_REFERER'))

context = {
Expand Down
7 changes: 3 additions & 4 deletions static/dist/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/dist/main.css.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions templates/pages/privacy-policy.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

{% block content %}

<section class="max-w-screen-2xl mx-auto px-5 pt-44">
<h3 class="text-3xl font-bold dark:text-white mb-3">Privacy Policy</h3>

{{ legal_privacy.html|safe }}
<section class="pt-52 md:pt-44 border-b border-gray-200">
<div class="max-w-screen-2xl mx-auto px-5">
<h3 class="text-3xl font-bold dark:text-white mb-3">Privacy Policy</h3>
{{ legal_privacy.html|safe }}
</div>
</section>

{% endblock content %}
9 changes: 5 additions & 4 deletions templates/pages/terms-condition.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

{% block content %}

<section class="max-w-screen-2xl mx-auto px-5 pt-44">
<h3 class="text-3xl font-bold dark:text-white mb-3">Terms and Conditions</h3>

{{ legal_terms.html|safe }}
<section class="pt-52 md:pt-44 border-b border-gray-200">
<div class="max-w-screen-2xl mx-auto px-5">
<h3 class="text-3xl font-bold dark:text-white mb-3">Terms and Conditions</h3>
{{ legal_terms.html|safe }}
</div>
</section>

{% endblock content %}

0 comments on commit 3d2bb40

Please sign in to comment.