-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added hide_preview field * added to form * basic functionality
- Loading branch information
1 parent
561d056
commit b581f63
Showing
7 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1.3 on 2025-03-01 17:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('shortener', '0002_url_clicks_url_last_accessed'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='url', | ||
name='hide_preview', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{% extends "shortener/../_base.html" %} | ||
|
||
{% block content %} | ||
<div class="container mx-auto mt-12"> | ||
<!-- Include the header --> | ||
{% include "shortener/../_header.html" %} | ||
|
||
<div class="max-w-lg mx-auto text-center"> | ||
<p>If not automatically redirected, click the link below ...</p> | ||
|
||
<a href="{{ original_url }}" class="mt-5 bg-emerald-700 hover:bg-emerald-800 text-white font-semibold transition duration-300 rounded-lg py-2 px-2.5 inline-flex items-center justify-center"> | ||
Visit | ||
</a> | ||
</div> | ||
</div> | ||
<script> | ||
// Wait for the page to load and redirect to the original URL | ||
document.addEventListener('DOMContentLoaded', function () { | ||
window.location.href = "{{ original_url }}"; | ||
}); | ||
</script> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters