django no module named wiki
Question: Okay, so I am following along with a tutorial about how to make a wiki with
django for practice. I'm using Python 2.7 with Django 1.6.4. I am trying to
run the server so I can refresh a page but I am all of a sudden getting the
error `"ImportError: No module named wiki."`

I've searched through all the answers on here and what's strange is that I
have a subdirectory in my project called Wiki that has an **__init__.py** file
inside it. Here is what my directory looks like:

    
    
    wikicamp (project)
        wiki
            __init__.py
            admin.py
            models.py
            tests.py
            views.py
        wikicamp
            __init__.py
            settings.py
            urls.py
            wsgi.py
        dbsqlite3
        manage.py
    

My **settings.py** file `INSTALLED_APPS` looks like this:

    
    
    INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'wiki',
    

)

I have tried it both as `'wikicamp.wiki`', and as `'wiki'`, and I get the same
thing with both. It won't even let me start the development server, I get that
error when I type `python manage.py runserver`. I have made sure I am in the
correct directory.

Here is all the info I get from that:

    
    
        PS C:\python27\Lib\site-packages\django\bin\wikicamp> python manage.py runserver
    Traceback (most recent call last):
    
      File "manage.py", line 10, in <module>
        execute_from_command_line(sys.argv)
    
      File "c:\Python27\lib\site-packages\django\core\management\__init__.py", line 399, in execute_from_command_line
        utility.execute()
    
      File "c:\Python27\lib\site-packages\django\core\management\__init__.py", line 392, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
    
      File "c:\Python27\lib\site-packages\django\core\management\base.py", line 242, in run_from_argv
        self.execute(*args, **options.__dict__)
    
      File "c:\Python27\lib\site-packages\django\core\management\base.py", line 280, in execute
        translation.activate('en-us')
    
      File "c:\Python27\lib\site-packages\django\utils\translation\__init__.py", line 130, in activate
        return _trans.activate(language)
    
      File "c:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 188, in activate
        _active.value = translation(language)
    
      File "c:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 177, in translation
        default_translation = _fetch(settings.LANGUAGE_CODE)
    
      File "c:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 159, in _fetch
        app = import_module(appname)
    
      File "c:\Python27\lib\site-packages\django\utils\importlib.py", line 40, in import_module
        __import__(name)
    
    ImportError: No module named wiki
    


Answer: I am following the same tutorials which you were learning from. You just need
to go to your wikicamp/url.py file and edit the `patterns` dict as:

    
    
    r'^wikicamp/(?P<page_name>[^/]+)/edit/$', 'wiki.views.edit_page'
    

instead of:

    
    
    r'^wikicamp/(?P<page_name>[^/]+)/edit/$', 'wikicamp.wiki.views.edit_page'
    

