Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def get_post_model():
    POST_MODEL_IMPORT = getattr(settings, 'POST_MODEL', 'nomadblog.models.Post')
    POST_MODULE, dummy, POST_MODEL_NAME = POST_MODEL_IMPORT.rpartition('.')
    return getattr(__import__(POST_MODULE, fromlist=[POST_MODULE]), POST_MODEL_NAME)
        


src/d/j/django-nomad-blog-2.1.0/nomadblog/views.py   django-nomad-blog(Download)
 
from nomadblog.models import Blog, BlogUser, Category
from nomadblog.utils import get_post_model
 
 
multiblog = getattr(settings, 'NOMADBLOG_MULTIPLE_BLOGS', False)
DEFAULT_STATUS = getattr(settings, 'PUBLIC_STATUS', 0)
POST_MODEL = get_post_model()

src/d/j/django-nomadblog-2.0.0/nomadblog/views.py   django-nomadblog(Download)
 
from nomadblog.models import Blog, BlogUser, Category
from nomadblog.utils import get_post_model
 
 
multiblog = getattr(settings, 'NOMADBLOG_MULTIPLE_BLOGS', False)
DEFAULT_STATUS = getattr(settings, 'PUBLIC_STATUS', 0)
POST_MODEL = get_post_model()