Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiboutas committed Jan 7, 2024
1 parent 057e662 commit 6470c50
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
12 changes: 1 addition & 11 deletions core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,16 @@ def ask_to_verify_email():

@db_periodic_task(crontab(hour="0", minute="15"))
def remove_temporal_profiles():
# Delete all temporal profiles
old_profiles = Profile.objects.filter(
category="temporal", updated__lt=datetime.now() - timedelta(days=30)
)
message_to_admin = f"Deleted {old_profiles.count()} old temporal profiles\n\n"
old_profiles.delete()

# Delete recent temporal profiles with no fullname and no email
recent_profiles = Profile.objects.filter(
category="temporal",
updated__lt=datetime.now() - timedelta(days=1),
fullname__isnull=True,
email__isnull=True,
)
message_to_admin += f"Deleted {recent_profiles.count()} recent temporal profiles"
report_to_admin(f"Deleted {recent_profiles.count()} recent temporal profiles")
recent_profiles.delete()

# Inform admin about it
report_to_admin(message_to_admin)


@db_periodic_task(crontab(hour="0", minute="20"))
def remove_expired_sessions():
Expand Down
4 changes: 2 additions & 2 deletions templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ <h1 class="mt-10 mb-10 text-center text-2xl font-bold leading-9 tracking-tight t
{% endif %}
<p class="mt-1 text-sm text-gray-500">
{% blocktrans %}By signing up, you agree to our
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.privacy_policy_page.page_url }}">Privacy Policy</a>
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.privacy_policy_page.url }}">Privacy Policy</a>
and
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.terms_page.page_url }}">Terms of Service</a>
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.terms_page.url }}">Terms of Service</a>

{% endblocktrans %}
</p>
Expand Down
4 changes: 2 additions & 2 deletions templates/socialaccount/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ <h1 class="mt-10 mb-10 text-center text-2xl font-bold leading-9 tracking-tight t
value="{{ redirect_field_value }}" />
{% endif %}
{% blocktrans %}By signing up, you agree to our
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.privacy_policy_page.page_url }}">Privacy Policy</a>
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.privacy_policy_page.url }}">Privacy Policy</a>
and
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.terms_page.page_url }}">Terms of Service</a>
<a class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500 ml-1" href="{{ settings.cms.Legal.terms_page.url }}">Terms of Service</a>

{% endblocktrans %}
<button type="submit"
Expand Down

0 comments on commit 6470c50

Please sign in to comment.