Application Community

The Community application contains the pages of Community.

Key files of the « Community » application

admin.py

class apps.community.admin.CommunityCategoryAdmin(model, admin_site)

Adding the CommunityCategory table in the Django admin and customizing the rendering

class apps.community.admin.CommunityPublicationAdmin(model, admin_site)

Adding the CommunityCategory table in the Django admin and customizing the rendering

model.py

class apps.community.models.CommunityCategory(*args, **kwargs)

community category model table

exception DoesNotExist
exception MultipleObjectsReturned
class apps.community.models.CommunityPublication(id, category, title, description, content, author, date)
exception DoesNotExist
exception MultipleObjectsReturned
class apps.community.models.PublicationForm(*args, **kwargs)
property media

Return all media required to render the widgets on this form.

class apps.community.models.Tag(id, label, color)
exception DoesNotExist
exception MultipleObjectsReturned

test.py

class apps.community.tests.TestCommunity(methodName='runTest')
setUp()

Hook method for setting up the test fixture before exercising it.

test_community()

Test community

view.py

apps.community.views.publication_delete(request, id)

Render publication_detail template

apps.community.views.publication_detail(request, id)

Render publication_detail template

apps.community.views.publication_edit(request, id)

Render publication_detail template

apps.community.views.publication_list(request, cat_id=None, tag_id=None, message=None)

Render publication_list template

apps.community.views.publication_new(request)

Render create publication

urls.py