'Utility function:
Creates a new urlpath with an article and a new revision for the
article
:returns: A new URLPath instance'

@classmethod
@atomic
@transaction_commit_on_success
def create_urlpath(cls, parent, slug, site=None, title=u'Root', article_kwargs={}, request=None, article_w_permissions=None, **revision_kwargs):

    if (not site):
        site = Site.objects.get_current()
    article = Article(**article_kwargs)
    article.add_revision(ArticleRevision(title=title, **revision_kwargs), save=True)
    article.save()
    newpath = cls.objects.create(site=site, parent=parent, slug=slug, article=article)
    article.add_object_relation(newpath)
    return newpath
