{"id":13419351,"url":"https://github.com/saadmk11/django-newsfeed","last_synced_at":"2025-05-16T08:05:01.694Z","repository":{"id":38366854,"uuid":"289010521","full_name":"saadmk11/django-newsfeed","owner":"saadmk11","description":"A news curator and newsletter subscription package for Django","archived":false,"fork":false,"pushed_at":"2024-11-18T08:09:01.000Z","size":170,"stargazers_count":192,"open_issues_count":6,"forks_count":20,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-09T04:01:49.535Z","etag":null,"topics":["curated-list","curator","django","django-framework","django-newsfeed","django-packages","django2","django3","hacktoberfest","news","news-curation","newsfeed","newsletter","newsletter-mail","newsletters","package","python","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/django-newsfeed/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saadmk11.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-20T13:14:37.000Z","updated_at":"2025-03-04T12:31:08.000Z","dependencies_parsed_at":"2024-06-21T19:23:03.531Z","dependency_job_id":"2b956884-c34c-434e-9097-dd71253bda2d","html_url":"https://github.com/saadmk11/django-newsfeed","commit_stats":{"total_commits":153,"total_committers":3,"mean_commits":51.0,"dds":0.2287581699346405,"last_synced_commit":"7342f096a43bd651b9ba88381f7044a8273e974f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fdjango-newsfeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fdjango-newsfeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fdjango-newsfeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saadmk11%2Fdjango-newsfeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saadmk11","download_url":"https://codeload.github.com/saadmk11/django-newsfeed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curated-list","curator","django","django-framework","django-newsfeed","django-packages","django2","django3","hacktoberfest","news","news-curation","newsfeed","newsletter","newsletter-mail","newsletters","package","python","python3"],"created_at":"2024-07-30T22:01:14.759Z","updated_at":"2025-05-16T08:04:56.687Z","avatar_url":"https://github.com/saadmk11.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"django-newsfeed\n===============\n\n.. image:: https://badge.fury.io/py/django-newsfeed.svg\n    :target: https://badge.fury.io/py/django-newsfeed\n\n.. image:: https://github.com/saadmk11/django-newsfeed/actions/workflows/test.yaml/badge.svg\n    :target: https://github.com/saadmk11/django-newsfeed/actions/workflows/test.yaml\n\n.. image:: https://codecov.io/gh/saadmk11/django-newsfeed/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/saadmk11/django-newsfeed\n\n.. image:: https://github.com/saadmk11/django-newsfeed/workflows/Changelog%20CI/badge.svg\n    :target: https://github.com/saadmk11/changelog-ci\n\n\nWhat is django-newsfeed?\n========================\n\n``django-newsfeed`` is a news curator and newsletter subscription package for django.\nIt can be used to create a news curator website which sends newsletters to their subscribers\nalso it can be used to add a news subscription section to your website.\n\nFeatures\n========\n\n* Create monthly, weekly or daily issues with ``draft`` issue support.\n* Create posts with different categories.\n* Archive and display all of the issues in your website.\n* Newsletter e-mail subscription (``ajax`` support) with e-mail verification.\n* Newsletter e-mail unsubscription (``ajax`` support).\n* Sending newsletters for each issue to all the subscribers.\n* Fully customizable templates.\n* Uses Django's internal tools for sending email.\n* Efficient mass mailing support.\n\nRequirements\n============\n\n* **Python**: 3.6, 3.7, 3.8, 3.9, 3.10\n* **Django**: 2.2, 3.0, 3.1, 3.2, 4.0\n\nExample Project\n===============\n\nYou can view the example project for this package `here`_.\nThis is a news-curator and newsletter subscription application that only uses this package.\nIt also uses ``celery``, ``celery-beat`` and ``redis`` to send email newsletters in the background.\nThe styles in the example project uses ``bootstrap``.\n\n.. _here: https://github.com/saadmk11/test-django-newsfeed\n\n\nDocumentation\n=============\n\nInstallation\n============\n\nInstall ``django-newsfeed`` using pip:\n\n.. code-block:: sh\n\n    pip install django-newsfeed\n\n\nThen add ``newsfeed`` to your ``INSTALLED_APPS``:\n\n.. code-block:: python\n\n    INSTALLED_APPS = [\n        ...\n        'newsfeed',\n    ]\n\nThen add ``newsfeed`` to your projects ``urls.py``:\n\n.. code-block:: python\n\n    urlpatterns = [\n        ...\n        path('newsfeed/', include('newsfeed.urls', namespace='newsfeed')),\n        ...\n    ]\n\nUsage\n=====\n**Available views**\n\nWe provide these views out of the box:\n\n* **latest_issue:** ``newsfeed/``\n* **issue_list:** ``newsfeed/issues/``\n* **issue_detail:** ``newsfeed/issues/\u003cslug:issue_number\u003e/``\n* **newsletter_subscribe:** ``newsfeed/subscribe/``\n* **newsletter_subscription_confirm:** ``newsfeed/subscribe/confirm/\u003cuuid:token\u003e/``\n* **newsletter_unsubscribe:** ``newsfeed/unsubscribe/``\n\n**Templates**\n\nThe basic templates are provided for all the views and emails with ``django-newsfeed``.\nYou can override the templates to add your own design.\n\nJust add ``newsfeed`` directory inside your templates directory\nadd templates with the same name as the showed tree below.\nmore on template overriding on the `django docs`_\n\n.. _django docs: https://docs.djangoproject.com/en/3.1/howto/overriding-templates/\n\nTemplate Tree for ``django-newfeed``:\n\n.. code-block::\n\n    templates\n        └── newsfeed\n            ├── base.html\n            ├── email\n            │     ├── email_verification.html\n            │     ├── email_verification_subject.txt\n            │     ├── email_verification.txt\n            │     └── newsletter_email.html\n            ├── issue_detail.html\n            ├── issue_list.html\n            ├── issue_posts.html\n            ├── latest_issue.html\n            ├── messages.html\n            ├── newsletter_subscribe.html\n            ├── newsletter_subscription_confirm.html\n            ├── newsletter_unsubscribe.html\n            └── subscription_form.html\n\n**Subscription confirmation Email**\n\nWe send subscription confirmation email to the new subscribers.\nyou can override these template to change the styles:\n\n.. code-block::\n\n    templates\n        └── newsfeed\n            ├── email\n            │     ├── email_verification.html\n            │     ├── email_verification_subject.txt\n            │     ├── email_verification.txt\n\n\n**Admin Actions**\n\nThese actions are available from the admin panel:\n\n* **publish issues:**  The selected issues will be published.\n* **mark issues as draft:**  The selected issues will be marked as draft.\n* **hide posts:**  The selected posts will be hidden from the issues.\n* **make posts visible:**  The selected posts will visible on the issues.\n* **send newsletters:**  Sends selected newsletters to all the subscribers.\n(``send newsletters`` action should be overridden to use a background task queue.\nSee the `example project`_ to see an example using celery)\n\n**Send Email Newsletter**\n\nWe provide a class to handle sending email newsletters to the subscribers.\nWe do not provide any background task queue by default. But it is fairly easy to set it up.\n\nSee the `example project`_ to see an example using ``celery`` and ``celery-beat``.\n\nYou can override this template to change the style of the newsletter:\n\n.. code-block::\n\n    templates\n        └── newsfeed\n            ├── email\n            │     └── newsletter_email.html\n\n\n.. _example project: https://github.com/saadmk11/test-django-newsfeed\n\nSettings Configuration\n======================\n\nThe below settings are available for ``django-newsfeed``.\nAdd these settings to your projects ``settings.py`` as required.\n\n``NEWSFEED_SITE_BASE_URL``\n--------------------------\n\n* default: ``http://127.0.0.1:8000`` (your sites URL)\n* required: True\n\nThis settings is required. You need to add your websites URL here in production.\nThis is used to generate confirmation URL and unsubscribe URL for the emails.\n\n``NEWSFEED_EMAIL_CONFIRMATION_EXPIRE_DAYS``\n-------------------------------------------\n\n* default: 3 (after number of days confirmation link expires)\n* required: False\n\nThis settings tells ``django-newsfeed`` to expire the confirmation link in specified number of days.\n\n``NEWSFEED_EMAIL_BATCH_SIZE``\n-----------------------------\n\n* default: 0 (number of emails per batch)\n* required: False\n\nThis settings is helpful when there are a lot of subscribers.\nThis settings tells ``django-newsfeed`` to send the specified number of emails per batch.\nif its zero (``0``) then all of the emails will be sent together.\n\n``NEWSFEED_EMAIL_BATCH_WAIT``\n-----------------------------\n\n* default: 0 (in seconds)\n* required: False\n\nThis settings tells ``django-newsfeed`` how long it should wait between\neach batch of newsletter email sent.\n\n``NEWSFEED_SUBSCRIPTION_REDIRECT_URL``\n--------------------------------------\n\n* default: ``/newsfeed/issues/``\n* required: False\n\nThis is only required if you are not using ``ajax`` request on the subscription form.\nThe ``JavaScript`` code for ``ajax`` is included with ``django-newsfeed`` and on by default.\n\n``NEWSFEED_UNSUBSCRIPTION_REDIRECT_URL``\n----------------------------------------\n\n* default: ``/newsfeed/issues/``\n* required: False\n\nThis is only required if you are not using ``ajax`` request on the unsubscription form.\nThe ``JavaScript`` code for ``ajax`` is included with ``django-newsfeed`` and on by default.\n\n\nSignals\n=======\n\n``django-newsfeed`` sends several signals for various actions.\nYou can add ``receivers`` to listen to the signals and\nadd your own functionality after each signal is sent.\nTo learn more about ``signals`` refer to django `Signals Documentation`_.\n\n.. _Signals Documentation: https://docs.djangoproject.com/en/3.1/topics/signals/\n\n\nSubscriber Signals\n------------------\n\n\n* ``newsfeed.signals.email_verification_sent(instance)``\n    Sent after email verification is sent, with ``Subscriber`` instance.\n\n* ``newsfeed.signals.subscribed(instance)``\n    Sent after subscription is confirmed, with ``Subscriber`` instance.\n\n* ``newsfeed.signals.unsubscribed(instance)``\n    Sent after unsubscription is successful, with ``Subscriber`` instance.\n\n\nContribute\n==========\n\nSee `CONTRIBUTING.rst \u003chttps://github.com/saadmk11/django-newsfeed/blob/master/CONTRIBUTING.rst\u003e`_\nfor information about contributing to ``django-newsfeed``.\n\n\nLicense\n=======\n\nThe code in this project is released under the `GNU General Public License v3.0`_\n\n.. _GNU General Public License v3.0: https://github.com/saadmk11/django-newsfeed/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadmk11%2Fdjango-newsfeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaadmk11%2Fdjango-newsfeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadmk11%2Fdjango-newsfeed/lists"}