Revision history [back]
After the "followit" is added to the list of INSTALLED_APPS, and you run syncdb, in the output you should see info on newly created tables for following users.
If it does not tell that the tables were created, then something is wrong. The feature works here and on my development server.
Also a line must be added to your project's top level urls.py
.
The app should allow to install the "bridge" tables after registering the models to follow anywhere in the models
module. In askbot it is done
try:
import followit
followit.register(User) #allow users to follow other users
except ImportError:
#don't do anything if followit app is not installed on the system.
pass
This app creates a bridge model programmatically when calling followit.register(some_model_to_follow)
.
When you run syncdb it will also install any missing tables (but will not remove any unused tables) It is possible to register other models later and run syncdb again.
At the same time it adds methods:
To User
(where x is the lowercased name of the model to follow):
- get_followed_x()
- is_following() (not sure, maybe it would be better to name it is_following_x() for consistency)
- follow_x()
- unfollow_x()
To the followed model - get_followers()
.
After the "followit" is added to the list of INSTALLED_APPS, and you run syncdb, in the output you should see info on newly created tables for following users.
If it does not tell that the tables were created, then something is wrong. The feature works here and on my development server.
Also a line must be added to your project's top level urls.py
.
The app should allow to install the "bridge" tables after registering the models to follow anywhere in the models
module. In askbot it is done
try:
import followit
followit.register(User) #allow users to follow other users
except ImportError:
#don't do anything if followit app is not installed on the system.
pass
This app creates a installs any missing bridge model programmatically tables when calling followit.register(some_model_to_follow)
.
When you run syncdb it will also install any missing tables (but will not remove any unused tables) . It is possible to register other models later and run syncdb again.
At the same time it adds methods:
To User (where x is the lowercased name of the model to follow):User
- get_followed_x()
- is_following() (not sure, maybe it would be better to name it is_following_x() for consistency)
- follow_x()
- unfollow_x()
To the followed model - get_followers()
.
After the "followit" is added to the list of INSTALLED_APPS, and you run syncdb, in the output you should see info on newly created tables for following users.
If it does not tell that the tables were created, then something is wrong. The feature works here and on my development server.
Also a line must be added to your project's top level urls.py
.
The app should allow to install the "bridge" tables after registering the models to follow anywhere in the models
module. In askbot it is done
try:
import followit
followit.register(User) #allow users to follow other users
except ImportError:
#don't do anything if followit app is not installed on the system.
pass
This app installs any missing bridge tables when calling followit.register(some_model_to_follow)
. It is possible to register other models later and run syncdb again.
At the same time it adds methods:
To User (where x is the lowercased name of the model to follow):
- get_followed_x()
- is_following() (not sure, maybe it would be better to name it is_following_x() for consistency)
- follow_x()
- unfollow_x()
To the followed model - get_followers()
After the "followit" is added to the list of INSTALLED_APPS, and you run syncdb, in the output you should see info on newly created tables for following users.
If it does not tell that the tables were created, then something is wrong. The feature works here and on my development server.
The app should allow to install the "bridge" tables after registering the models to follow anywhere in the models
module. In askbot it is done
try:
import followit
followit.register(User) #allow users to follow other users
except ImportError:
#don't do anything if followit app is not installed on the system.
pass
This app installs any missing bridge tables when calling followit.register(some_model_to_follow)
. It is possible to register other models later and run syncdb again.
At the same time it adds methods:
To User (where x is the lowercased name of the model to follow):
- get_followed_x()
- is_following() (not sure, maybe it would be better to name it is_following_x() for consistency)
- follow_x()
- unfollow_x()
To the followed model - get_followers()
After the "followit" is added to the list of INSTALLED_APPS, and you run syncdb, in the output you should see info on newly created tables for following users.
If it does not tell that the tables were created, then something is wrong. The feature works here and on my development server.
The app should allow to install the "bridge" tables after registering the models to follow anywhere in the models
module. In askbot it is done
try:
import followit
followit.register(User) #allow users to follow other users
except ImportError:
#don't do anything if followit app is not installed on the system.
pass
This app installs any missing bridge tables when calling followit.register(some_model_to_follow)
. At the same time it adds methods:
To User (where x is the lowercased name of the model to follow):
- get_followed_x()
- is_following() (not sure, maybe it would be better to name it is_following_x() for consistency)
- follow_x()
- unfollow_x()
To the followed model - get_followers()