mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-13 21:49:26 +02:00
Implement add bookmark route
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
{% for bookmark in bookmarks %}
|
||||
<li>
|
||||
<p>
|
||||
<a href="{{ bookmark.url }}" target="_blank">{{ bookmark.title }}</a>
|
||||
<a href="{{ bookmark.url }}" target="_blank">{{ bookmark.resolved_title }}</a>
|
||||
</p>
|
||||
{% if bookmark.description is not None %}
|
||||
<p>{{ bookmark.description }}</p>
|
||||
{% if bookmark.resolved_description is not None %}
|
||||
<p>{{ bookmark.resolved_description }}</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<a href="{% url 'bookmarks:edit' bookmark.id %}">Edit</a>
|
||||
|
@@ -2,4 +2,23 @@
|
||||
|
||||
{% block content %}
|
||||
<h2>New bookmark</h2>
|
||||
<form action="{% url 'bookmarks:new' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="field">
|
||||
<label for="{{ form.url.id_for_label }}">URL</label>
|
||||
{{ form.url }}
|
||||
{{ form.url.errors }}
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="{{ form.title.id_for_label }}">Title</label>
|
||||
{{ form.title }}
|
||||
{{ form.title.errors }}
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="{{ form.description.id_for_label }}">Description</label>
|
||||
{{ form.description }}
|
||||
{{ form.description.errors }}
|
||||
</div>
|
||||
<input type="submit" value="Add">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user