diff --git a/.dockerignore b/.dockerignore index c04ec2f..0f6a015 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,7 +3,6 @@ # Include files required for build or at runtime !/bookmarks -!/siteroot !/bootstrap.sh !/LICENSE.txt @@ -19,4 +18,4 @@ !/version.txt # Remove dev settings -/siteroot/settings/dev.py +/bookmarks/settings/dev.py diff --git a/Makefile b/Makefile index adefa0f..9a400d9 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,5 @@ test: format: black bookmarks - black siteroot npx prettier bookmarks/frontend --write npx prettier bookmarks/styles --write diff --git a/README.md b/README.md index 3117944..f265f98 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Small improvements, bugfixes and documentation improvements are always welcome. ## Development -The application is built using the Django web framework. You can get started by checking out the excellent [Django docs](https://docs.djangoproject.com/en/4.1/). The `bookmarks` folder contains the actual bookmark application, `siteroot` is the Django root application. Other than that the code should be self-explanatory / standard Django stuff 🙂. +The application is built using the Django web framework. You can get started by checking out the excellent [Django docs](https://docs.djangoproject.com/en/4.1/). The `bookmarks` folder contains the actual bookmark application. Other than that the code should be self-explanatory / standard Django stuff 🙂. ### Prerequisites - Python 3.12 diff --git a/bookmarks/feeds.py b/bookmarks/feeds.py index 4afc805..ec8308e 100644 --- a/bookmarks/feeds.py +++ b/bookmarks/feeds.py @@ -74,7 +74,7 @@ class AllBookmarksFeed(BaseBookmarksFeed): return queries.query_bookmarks(feed_token.user, feed_token.user.profile, search) def link(self, context: FeedContext): - return reverse("bookmarks:feeds.all", args=[context.feed_token.key]) + return reverse("linkding:feeds.all", args=[context.feed_token.key]) class UnreadBookmarksFeed(BaseBookmarksFeed): @@ -87,7 +87,7 @@ class UnreadBookmarksFeed(BaseBookmarksFeed): ).filter(unread=True) def link(self, context: FeedContext): - return reverse("bookmarks:feeds.unread", args=[context.feed_token.key]) + return reverse("linkding:feeds.unread", args=[context.feed_token.key]) class SharedBookmarksFeed(BaseBookmarksFeed): @@ -100,7 +100,7 @@ class SharedBookmarksFeed(BaseBookmarksFeed): ) def link(self, context: FeedContext): - return reverse("bookmarks:feeds.shared", args=[context.feed_token.key]) + return reverse("linkding:feeds.shared", args=[context.feed_token.key]) class PublicSharedBookmarksFeed(BaseBookmarksFeed): @@ -114,4 +114,4 @@ class PublicSharedBookmarksFeed(BaseBookmarksFeed): return queries.query_shared_bookmarks(None, UserProfile(), search, True) def link(self, context: FeedContext): - return reverse("bookmarks:feeds.public_shared") + return reverse("linkding:feeds.public_shared") diff --git a/bookmarks/services/exporter.py b/bookmarks/services/exporter.py index fe41bf4..bf7cd53 100644 --- a/bookmarks/services/exporter.py +++ b/bookmarks/services/exporter.py @@ -35,7 +35,7 @@ def append_bookmark(doc: BookmarkDocument, bookmark: Bookmark): desc += f"[linkding-notes]{html.escape(bookmark.notes)}[/linkding-notes]" tag_names = bookmark.tag_names if bookmark.is_archived: - tag_names.append("linkding:archived") + tag_names.append("linkding:bookmarks.archived") tags = ",".join(tag_names) toread = "1" if bookmark.unread else "0" private = "0" if bookmark.shared else "1" diff --git a/bookmarks/services/parser.py b/bookmarks/services/parser.py index 4eb7c1c..62d1559 100644 --- a/bookmarks/services/parser.py +++ b/bookmarks/services/parser.py @@ -62,9 +62,9 @@ class BookmarkParser(HTMLParser): def handle_start_a(self, attrs: Dict[str, str]): vars(self).update(attrs) tag_names = parse_tag_string(self.tags) - archived = "linkding:archived" in self.tags + archived = "linkding:bookmarks.archived" in self.tags try: - tag_names.remove("linkding:archived") + tag_names.remove("linkding:bookmarks.archived") except ValueError: pass diff --git a/siteroot/settings/__init__.py b/bookmarks/settings/__init__.py similarity index 100% rename from siteroot/settings/__init__.py rename to bookmarks/settings/__init__.py diff --git a/siteroot/settings/base.py b/bookmarks/settings/base.py similarity index 99% rename from siteroot/settings/base.py rename to bookmarks/settings/base.py index 4bfc093..a5ded9e 100644 --- a/siteroot/settings/base.py +++ b/bookmarks/settings/base.py @@ -58,7 +58,7 @@ MIDDLEWARE = [ "django.middleware.locale.LocaleMiddleware", ] -ROOT_URLCONF = "siteroot.urls" +ROOT_URLCONF = "bookmarks.urls" TEMPLATES = [ { @@ -80,7 +80,7 @@ TEMPLATES = [ DEFAULT_AUTO_FIELD = "django.db.models.AutoField" -WSGI_APPLICATION = "siteroot.wsgi.application" +WSGI_APPLICATION = "bookmarks.wsgi.application" # Password validation # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators diff --git a/siteroot/settings/custom.py b/bookmarks/settings/custom.py similarity index 100% rename from siteroot/settings/custom.py rename to bookmarks/settings/custom.py diff --git a/siteroot/settings/dev.py b/bookmarks/settings/dev.py similarity index 100% rename from siteroot/settings/dev.py rename to bookmarks/settings/dev.py diff --git a/siteroot/settings/prod.py b/bookmarks/settings/prod.py similarity index 100% rename from siteroot/settings/prod.py rename to bookmarks/settings/prod.py diff --git a/bookmarks/templates/bookmarks/bookmark_list.html b/bookmarks/templates/bookmarks/bookmark_list.html index 4014764..e63fb72 100644 --- a/bookmarks/templates/bookmarks/bookmark_list.html +++ b/bookmarks/templates/bookmarks/bookmark_list.html @@ -86,7 +86,7 @@ {% if bookmark_item.is_editable %} {# Bookmark owner actions #} {% if bookmark_list.show_edit_action %} - Edit + Edit {% endif %} {% if bookmark_list.show_archive_action %} {% if bookmark_item.is_archived %} diff --git a/bookmarks/templates/bookmarks/details/assets.html b/bookmarks/templates/bookmarks/details/assets.html index 70a5c92..a6a120a 100644 --- a/bookmarks/templates/bookmarks/details/assets.html +++ b/bookmarks/templates/bookmarks/details/assets.html @@ -18,7 +18,7 @@