Giter Site home page Giter Site logo

matagus / django-planet Goto Github PK

View Code? Open in Web Editor NEW
173.0 11.0 56.0 4.34 MB

:globe_with_meridians: A django planet and feeds (RSS and ATOM) aggregator application for Django

Home Page: https://django-planet.fly.dev/

License: Other

Python 84.21% CSS 0.56% HTML 15.22%
python django planet rss river-of-news aggregator blog-aggregator feed-aggregator feed-reader

django-planet's Introduction

Open Source Projects

  • matorral: A very simple & extensible project managent system built using Django + HTMX + Bulma.
  • django-app-starter: A copier template for generating a Django app: pre-commit, test matrix for the latest Dajngo and Python versions, coverage report, Github actions for CI & publish to pypi using hatch + release, Github issues config + templates, labels management, documentation using MKDocs, and much more.
  • django-pagination-py3: A port of the wonderful ericflo/django-pagination app to Python 3 + Django 4.x and 5.x.
  • awesome-django-articles: A collection of amazing posts abouth Django I learned from.
  • django-generic-links; Add links + metadata to any Django model instance.
  • django-planet: A simple Django app to create a feed aggregator website, aka a planet.
  • merge-requests-monitor: A litte MacOs System Tray app for quickly accessing open Merge Requests in Gitlab.
  • Keyup: A simple, fast & beautiful terminal-based Clickup client written in Python.
  • JiraHub: A webapp to quickly access and browse Jira projects from different accounts. Django + HTMX + Cirrus CSS.
  • django-admin-contexts: Display only a set of apps and models in the Django Admin homepage, based on the chosen context.

django-planet's People

Contributors

angvp avatar bitdeli-chef avatar eluttine avatar jerem avatar jilljenn avatar jimr avatar matagus avatar orsenthil avatar rolo avatar vad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-planet's Issues

Foreman start doen`t server static file, Heroku also

i deploy the code to heroku app. readtamil.herokuapp.com

locally runserver works fine no plm. but foreman start doesnt serve static file and i dont know why. and i deployed then heroku also same error static file doen`t serve., Please take look above url. And i copied my settings also https://github.com/rajasimon/readtamil

"""
Django settings for buildtamil project.

For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""

Build paths inside the project like this: os.path.join(BASE_DIR, ...)

import os

BASE_DIR = os.path.dirname(os.path.abspath(file) + '../../../')

Quick-start development settings - unsuitable for production

See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/

DEBUG = True

TEMPLATE_DEBUG = DEBUG

ALLOWED_HOSTS = []

MANAGERS = ADMINS

Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'planet',
'pagination',
'tagging',
'pinax_theme_bootstrap',
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.gzip.GZipMiddleware',
'pagination.middleware.PaginationMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.request",
"django.core.context_processors.i18n",
"django.contrib.messages.context_processors.messages",
"planet.context_processors.context"
)

ROOT_URLCONF = 'planet.urls'

WSGI_APPLICATION = 'buildtamil.wsgi.application'

Database

https://docs.djangoproject.com/en/1.6/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': '',
'PASSWORD': '',
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '', # Set to empty string for default.
}
}

STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'django.contrib.staticfiles.finders.FileSystemFinder',
)

STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(BASE_DIR, 'static/'),
)

STATIC_ROOT = ''

STATIC_URL = '/static/'

TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates/'),
)

List of callables that know how to import templates from various sources.

TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',

'django.template.loaders.eggs.Loader',

)

Internationalization

https://docs.djangoproject.com/en/1.6/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

Static files (CSS, JavaScript, Images)

https://docs.djangoproject.com/en/1.6/howto/static-files/

SITE_ID = 1

PLANET = {"USER_AGENT": "django-planet/0.1"}

HEROKU

Parse database configuration from $DATABASE_URL

if os.environ.has_key('DATABASE_URL'):
import dj_database_url
DATABASES['default'] = dj_database_url.config()

Allow all host headers

ALLOWED_HOSTS = ['*']

Fix url names

In order to make this app really reusable, modify url names to meet the pattern . For example: blog_detail should be planet_blog_detail. This way url names won't collide with other app url names.

MySQL compatibility

While trying to work with django-planet with MySQL I've encountered two problems:

The Blog model requires the "url" will be both unique and with max_length of 1024. In MySQL this is not possible. URLFields (or actually any char field) can be unique only if it's 256 characters or less.

The second problem is that mysql limits prefix support to 767, and planet requires more. I don't understand this completely but this is documented here: http://dev.mysql.com/doc/refman/5.1/en/create-index.html
search for 767

Feeds with short description processing

Hi. While processing feed having short description and full content inside it, created post has short description as content, but real content is lost.
Example. http://beautynesia.com/feed/
Code doing this is leaving in line 170 of
management.commands.init
content = entry.get('description') or entry.get("content", [{"value": ""}])[0]["value"]
Thanks

pip installation fails

% pip install django-planet
Downloading/unpacking django-planet
  Downloading django-planet-0.4.11.linux-i686.tar.gz (59Kb): 59Kb downloaded
  Running setup.py egg_info for package django-planet
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
    IOError: [Errno 2] No such file or directory: '/home/stevep/venvs/planet/build/django-planet/setup.py'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

IOError: [Errno 2] No such file or directory: '/home/stevep/venvs/planet/build/django-planet/setup.py'

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/stevep/venvs/planet/build/django-planet
Storing complete log in /home/stevep/.pip/pip.log
% ls /home/stevep/venvs/planet/build/django-planet/
home  pip-egg-info
% ls /home/stevep/venvs/planet/build/django-planet/home/matagus/virtualenvs/fase2/lib/python2.7/site-packages/
django_planet-0.4.11-py2.7.egg-info  planet

MySQL Incompatibility: unique_together constraint on BLOB

The Post model contains a unique_together constraint with includes the (BLOB) guid field, making it MySQL incompatible. Running syncdb results in the following error:

_mysql_exceptions.OperationalError: (1170, "BLOB/TEXT column 'text' used in key specification without a key length")

I was going to submit a patch, but I'm not sure how you want to handle this. Clearly, the easiest thing would be to just remove the constraint, however another option is to store a hash of the guid and use that for the unique_together tuple instead.

Here's some more information about this particular limitation.

AttributeError: 'module' object has no attribute 'register'

Seems that new versions of django-tagging changed their API, so now django-planet throws this except

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/angvp/virtualenvs/pyarweb/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/home/angvp/virtualenvs/pyarweb/lib/python3.4/site-packages/django/core/management/__init__.py", line 328, in execute
    django.setup()
  File "/home/angvp/virtualenvs/pyarweb/lib/python3.4/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/angvp/virtualenvs/pyarweb/lib/python3.4/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/angvp/virtualenvs/pyarweb/lib/python3.4/site-packages/django/apps/config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "/home/angvp/virtualenvs/pyarweb/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/angvp/virtualenvs/pyarweb/lib/python3.4/site-packages/planet/models.py", line 292, in <module>
    tagging.register(Post)
AttributeError: 'module' object has no attribute 'register'

I'm working on a quick PR for handling different versions

#enhancement

It would be nice if there was a feedmanager part. So each user could manage his/her feeds (add/remove ...) them. I mean like Google Reader.

I mean something like allowing users to create subscription lists. take a look at please.

Model
Thanks

OPML import

It will be nice to let users import .opml files. From comnand line and/or using admin site.

demo down

demo site gives a 500 error. monitoring is a good thing.

TemplateDoesNotExist at / _messages.html

i followed every step to run django-planet after installation when i run ./manage runserver getting this error ..

vijay@vijay-Ideapad-Z570:~/workspace/django-planet$ ./manage.py runserver
Traceback (most recent call last):
File "./manage.py", line 8, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 399, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 280, in execute
translation.activate('en-us')
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/init.py", line 130, in activate
return _trans.activate(language)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 188, in activate
_active.value = translation(language)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 159, in _fetch
app = import_module(appname)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
import(name)
ImportError: No module named pagination

but i installed again pagination then also like that only . can you help me .?

Haystack integration

because every website needs a cool way to search. Indexes for posts, blogs, tags and authors.

Additionally:

  • Similar posts for a given instance (post, blog, etc) vĂ­a "more like this" feature will be nice.
  • Spelling suggestions when no result is returned?
  • faceting for posts (tags, blogs, authors)

Modify Planet Template ?

beginners guide ..

How to change the site name .. ? currently its show example..com

And also tell me how to change footer ..? currently django powered site ..?

Feed data doesn't show anything

Hey, guys.

I've installed django-planet on my django project. So its successfully installed.
And I've added the urls like this.

url(r'^news/', include('planet.urls'))

And go to http://localhost:8000/news
It says only What's new in Django community blogs?
No feed data displayed.

Actually I've run these commands already

python manage.py planet_add_feed http://www.economonitor.com/feed/rss/
python manage.py planet_update_all_feeds

@matagus, @vad, @jerem Could you please help me this?

Thanks!

problem with django 1.6

As you know, 1.6 is now in the wild. for some reason when I tried to pip install the project., my django 1.6 got uninstalled and 1.5 installed instead. can this be solved or is there an incompatibility ?

Deprecate Django 1.6 support ?

django-tagging did it, I think because is not LTS anymore, but now the tests are failing because of that, I thought in provide a patch to get support for Django 1.6 on django-tagging but they explicity removed the support of Django 1.6.

So I think the best way to go is to remove the support of django-planet in django 1.6, good thing is that you can get ride of south migrations if you do this.

How to integrate with pinax

Templates, installation instructions, etc. A sample project (source code) + a live little planet site will be great to have.

TemplateDoesNotExist _messages.html

I'm not a Django expert, but I seem to have everything correct for running django-planet, but it complains about missing template called _messages.html, included from base.html line 65.

Is it missing from the repo?

Fixes an new features

I fixed a few things:

  • Unicode issue when deleting a feed
  • Timezone localization on dates
  • More simple and efficient documentation

And added some features:

  • Added a max number of posts to retrieve setting
  • Added a base_template setting (and removed the confusing site_base stuff)
  • View and templatetag for categories
  • Support for the Huey async backend for updates (more easy to setup than Celery)
  • Option to display or not a feed in the main view (=> added a field in the Feed model)
  • Made the setting PLANET_USER_AGENT optional

I also removed the South migrations support and the Bootstrap Pinax theme requirement

And I plan to do this:

  • Fix the tests with reversed urls
  • Improve the search (and remove the context processor), probably using django-watson
  • Categories refactoring using mptt
  • Better default templates with navigation links

The idea is to get a usable module out of the box with minimum efforts from the user.

Check it here: master...synw:master

Is this project dead?

I see that this seems to be very old and unmaintained code. Is this project dead?

Connection refused error.

Hello,

When trying to add feed I am getting a connection refused Error. Do You know why this might be and how can I solve this problem?

Find the complete error message below:

Yours Sincerely,

Michal Stepniewski

soutys@soutys-Lenovo-V570:~/Praca/Programowanie/PythonDeveloper/django/agregator/mysite$ python manage.py planet_add_feed http://feeds.reuters.com/news/artsculture
/usr/local/lib/python2.7/dist-packages/django/core/management/init.py:345: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
self.fetch_command(subcommand).run_from_argv(self.argv)

/home/soutys/Praca/Programowanie/PythonDeveloper/django/agregator/mysite/mysite/urls.py:21: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.
urlpatterns = patterns('',

System check identified some issues:

WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS, TEMPLATE_LOADERS.
Traceback (most recent call last):

Install instructions do not work

The installation instructions do not work. Instead of describing all the different kind of errors and the long-winded trial and error process I went through I think it would make more sense if you just tried to follow the instructions yourself - you will see that it will not lead to a working installation of your project.

It would be a very good and important welcome step when new users could just follow the installation instructions successfully - a positive result is always very good for motivation.

Additionally, instead of writing lots of text and make people copy-paste that text (that you have to maintain in the future) it would be much easier to simply provide an example project (or a setup script).

Thanks for your attention!

Inconsistent requirements (setup.py vs requirements.txt)

The listed versions required for Django, Celery, and django-celery are all (slightly) different between the two files. Presumably setup.py is authoritative? How about fixing requirements.txt and reading it into setup.py to guarantee consistency? I'm happy to submit a PR for that if you're interested.

cannot handle urls with unicode characters

NoReverseMatch at /planet

Reverse for ''planet_tag_detail'' with arguments '(u'"\u56fd\u5916\u56ed\u827a"',)' and keyword arguments '{}' not found.

In this case, the argument tag.name for planet_tag_detail should be some Chinese characters.

Get Main Site Actually Working

You should get the main django-planet site working. Since http://planetdjango.org just shutdown yesterday the community will be looking for a working alternative. I was going to see about standing something up this week, but it would be easier/better for this project to update and roll forward.

I face - TemplateDoesNotExist at /

TemplateDoesNotExist at /
planet/posts/list.html
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Django Version: 1.8.14
Exception Type: TemplateDoesNotExist
Exception Value:    
planet/posts/list.html
Exception Location: /Users/senthil/python2.7/py27venv/lib/python2.7/site-packages/django/template/loader.py in render_to_string, line 137
Python Executable:  /Users/senthil/python2.7/py27venv/bin/python
Python Version: 2.7.12
Python Path:    
['/Users/senthil/workspace/github/django-planet',
...

More information

Template-loader postmortem

Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
/Users/senthil/workspace/github/django-planet/planet/templates/planet/posts/list.html (File exists)
Using loader django.template.loaders.app_directories.Loader:
/Users/senthil/python2.7/py27venv/lib/python2.7/site-packages/django/contrib/auth/templates/planet/posts/list.html (File does not exist)
/Users/senthil/python2.7/py27venv/lib/python2.7/site-packages/pagination/templates/planet/posts/list.html (File does not exist)
/Users/senthil/workspace/github/django-planet/planet/templates/planet/posts/list.html (File exists)

Any suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.