Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

docs/getting-started.md example doesn't work. #410

Closed
@n2ygk

Description

@n2ygk

Following the running the example app instructions results in several errors:

  • runtests.py is missing: not found anywhere in the repo. Did you mean django-admin.py test?
  • django-admin.py runserver errors out with:
django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

Trying to set DJANGO_SETTINGS_MODULE complains about other missing stuff:

ModuleNotFoundError: No module named 'polymorphic'

Here's what pip freeze shows:

Django==2.0.2
djangorestframework==3.7.7
-e git+https://github.com/django-json-api/django-rest-framework-json-api.git@c5d34e2ea67bab8a4e9570f54779911570f24c83#egg=djangorestframework_jsonapi
inflection==0.3.1
packaging==16.8
pyparsing==2.2.0
pytz==2017.3
six==1.11.0

I attempted these fixes:

pip install django-polymorphic
pip install django-debug_toolbar
export DJANGO_SETTINGS_MODULE=example.settings.dev
django-admin.py runserver
...
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
?: debug_toolbar.middleware.DebugToolbarMiddleware is missing from MIDDLEWARE.
	HINT: Add debug_toolbar.middleware.DebugToolbarMiddleware to MIDDLEWARE.

which is weird since:

grep -nr debug_toolbar.middleware.DebugToolbarMiddleware .
...
./example/settings/dev.py:63:    'debug_toolbar.middleware.DebugToolbarMiddleware',

I've successfully used most of DJA based on usage.md but was looking for some examples, especially for resource-related fields and figured the example app would be a good place to start.

Happy to try and submit a PR with improved documentation if you can provide some guidance on what's supposed to be there. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions