Skip to content

Commit

Permalink
Documentation edits (#56)
Browse files Browse the repository at this point in the history
-Edited app name in migration command
-Edited app path in __init__.py and registry_config.py
  • Loading branch information
kkomninos authored and ellmetha committed Mar 26, 2017
1 parent fa4ea53 commit 69b8a99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/customization/overriding_applications.rst
Expand Up @@ -90,14 +90,14 @@ Define the application AppConfig

Most of *django-machina*'s applications define sublclasses of Django's ``AppConfig`` which can perform initialization operations. *Django-machina* ``AppConfig`` instances are defined inside sub-modules called ``registry_config``. You need to define an ``AppConfig`` subclass for your custom application by subclassing the overridden application ``AppConfig``. So your application's ``__init__.py`` should report the custom application ``AppConfig``::

default_app_config = 'apps.forum_conversation.registry_config.ConversationRegistryConfig'
default_app_config = 'yourproject.apps.forum_conversation.registry_config.ConversationRegistryConfig'

And in ``registry_config.py`` in you application you have something like::

from machina.apps.forum_conversation.registry_config import ConversationRegistryConfig as BaseConversationRegistryConfig

class ConversationRegistryConfig(BaseConversationRegistryConfig):
name = 'apps.forum_conversation'
name = 'yourproject.apps.forum_conversation'


Add the local application to your INSTALLED_APPS
Expand Down
3 changes: 2 additions & 1 deletion docs/customization/recipes/overriding_models.rst
Expand Up @@ -35,6 +35,7 @@ For example, in order to define a custom version of the ``Topic`` model it is ne

from __future__ import unicode_literals

from django.db import models
from machina.apps.forum_conversation.abstract_models import AbstractTopic

# Custom models should be declared before importing
Expand All @@ -56,4 +57,4 @@ As stated previously, you should've copied the content of the ``migration`` fold

.. code-block:: bash
$ django-admin makemigrations forum_conversations
$ django-admin makemigrations forum_conversation

0 comments on commit 69b8a99

Please sign in to comment.