Skip to main content

App to create a microblog for sharing knowledge.

Project description

Microblog app used to share quick knowledge. This code powers Vinta’s lessons learned running at

The posts are created via slack using a custom command and are automatically posted on twitter.


Install Django Knowledge Share:

pip install django-knowledge-share

Create an app for your microblog:

python startapp microblog

Add it to your INSTALLED_APPS:


In your add the urls entry:

url(r'^', include('knowledge_share.urls', namespace='microblog')),

In your microblog/ create your models by inheriting from the abstract models:

# customize those models as needed
from knowledge_share import models as knowledge_share_abstract_models

class MicroBlogPost(knowledge_share_abstract_models.MicroBlogPostBase):

class MicroBlogCategory(knowledge_share_abstract_models.MicroBlogCategoryBase):

Then create and run your migrations:

python makemigrations
python migrate



You can see the available models and it’s fields here. They are all abstract and you need to create an instance of it (see Quickstart section).

Slack Integration

Create a custom command in this page:

Set the url to your slack endpoint, by default Copy the generated token and add to your as “SLACK_TOKEN=’your-token’”. To send a new post use /yourcommand This is a blog post content [Category, Another Category]

Twitter Integration

You will need to set the following settings using your twitter data:


Whenever new posts are created it will be posted to twitter.

Template tags

Whenever you are showing the content of the post you should use:

{% load microblog %}

{{ post.content|convert_to_html }}

If you want to create a link with the content to be shared you can use:

{% load microblog %}

<a href="{{ post|format_post }}">
    Share on twitter

RSS Feed

There is a RSS feed served by default at /microblog/feed/.


The following configurations are available:


# name of the app created with your microblog's models
KNOWLEDGE_APP_NAME = 'microblog'
# the title of the rss feed (available at: /microblog/feed/)
# the link of the feed
KNOWLEDGE_FEED_LINK = '/microblog/'
# Either to use twitter or not

Running Tests

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox


Tools used in rendering this package:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-knowledge-share, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size django-knowledge-share-0.2.0.tar.gz (10.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page