<commit_before># django-follow

![](https://secure.travis-ci.org/caffeinehit/django-follow.png)

django-follow enables your users to follow any model in your Django application.

## Installation:

    pip install django-follow

## Usage:

* Add `follow` to your `INSTALLED_APPS`
* Include `follow.urls` into your URLs if you plan on using the views:

		urlpatterns = patterns('',
			url('^', include('follow.urls')),
		)
	
* Register the models you want to be able to follow in your `models.py` files:

		from django.db import models
		from follow import utils

		class MyModel(models.Model):
			field = models.CharField(max_length = 255)
		

		utils.register(MyModel)

## Test

The repository includes a sample project and application that is configured
to test `django-follow`.

Clone the repository and cd into the project folder:

	cd example/
	python manage.py test follow
    
## API

### Manager

* `Follow.objects.create(user, obj, **kwargs)`:  
  Makes `user` follow `obj`
<commit_msg>Added note about #16 to README<commit_after># django-follow

![](https://secure.travis-ci.org/caffeinehit/django-follow.png)

django-follow enables your users to follow any model in your Django application.

## Installation:

    pip install django-follow

## Usage:

* Add `follow` to your `INSTALLED_APPS`
* Include `follow.urls` into your URLs if you plan on using the views:

		urlpatterns = patterns('',
			url('^', include('follow.urls')),
		)
	
* Register the models you want to be able to follow in your `models.py` files:

		from django.db import models
		from follow import utils

		class MyModel(models.Model):
			field = models.CharField(max_length = 255)
		

		utils.register(MyModel)

**NOTE** You must register your models before running `syncdb` or you
  will run into the issue described in [django-follow/issues/16](https://github.com/caffeinehit/django-follow/issues/16)


## Test

The repository includes a sample project and application that is configured
to test `django-follow`.

Clone the repository and cd into the project folder:

	cd example/
	python manage.py test follow
    
## API

### Manager

* `Follow.objects.create(user, obj, **kwargs)`:  
  Makes `user` follow `obj`

{'fraction_non_alphanumeric': 0.10600545950864422, 'fraction_numerical': 0.00545950864422202, 'mean_word_length': 3.975113122171946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5945215', 'n_tokens_mistral': 714, 'n_tokens_neox': 655, 'n_words': 240}