https://github.com/pybites/pyplanet-django
First Django app that imports Planet Python feed and lets us tweet entries and mark them skipped / shared
https://github.com/pybites/pyplanet-django
Last synced: 11 months ago
JSON representation
First Django app that imports Planet Python feed and lets us tweet entries and mark them skipped / shared
- Host: GitHub
- URL: https://github.com/pybites/pyplanet-django
- Owner: pybites
- Created: 2017-07-16T23:54:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T11:33:23.000Z (almost 9 years ago)
- Last Synced: 2025-04-07T11:37:41.858Z (about 1 year ago)
- Language: Python
- Size: 910 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyPlanet Article Sharer Django App
## About
Last week we kicked off [100 days of Django](https://pybit.es/special-100days-of-code.html) and this is our first Django app!
This app lets you import [Planet Python's feed](http://planetpython.org) into an SQLite DB.
The Django front-end shows the articles in a table:

Upon clicking each link it shows the parsed data and action buttons:

The "Tweet this" button uses Twitter's [Web Intents](https://dev.twitter.com/web/intents) (redirect to generated link)

You can update the article as "Shared" or "Skipped" which is updated in the DB:

## Try it yourself!
1. clone this repo:
$ git clone git@github.com:pybites/pyplanet-django.git
2. make venv and install dependencies:
$ python3 -m venv venv && source venv/bin/activate
(venv) $ pip install -r requirements.txt
3. create DB tables (admin stuff to be added):
(venv) $ python manage.py migrate
Operations to perform:
Apply all migrations: admin, articles, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
...
...
Applying sessions.0001_initial... OK
4. run the [management command](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/) to import Planet Python's feed:
(venv) $ python manage.py importfeed
Article id 1 created
Article id 2 created
...
...
Article id 25 created
25 articles added
5. run local server:
(venv) $ python manage.py runserver
6. browse to [http://127.0.0.1:8000/](http://127.0.0.1:8000/)
## TODOs
* Deploy to Heroku or PythonAnywhere
* Add `importfeed` command to a cronjob
* Add user authentication and tracking who edits what (already field in the model)
* Integrate Twitter API so green "Mark Shared" button can be made redundant