Django restful project standalone

76 views
Skip to first unread message

Peter Mudoko

unread,
Sep 20, 2018, 7:10:57 AM9/20/18
to Django users
Hi guys am experimenting how i can use django restful framework in a standalone python project , i am trying to import from rest_framework import status
from rest_framework.generics import GenericAPIView, from rest_framework.response import Response but this error is propping always how can i handle it considering its not a djangle project how can i hack it

  File "/home/peter/.local/lib/python3.6/site-packages/django/conf/__init__.py", line 42, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

farman...@gmail.com

unread,
Sep 20, 2018, 7:18:17 AM9/20/18
to Django users

Jani Tiainen

unread,
Sep 20, 2018, 10:44:48 AM9/20/18
to django...@googlegroups.com
Hi.

Could you also describe what are you trying to achieve? People might have good solutions for you if you provide more detailed information.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/db3f868d-81d3-4b94-9909-6e456ef5b6a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages