No module named 'graphene_djangographql_jwt' - django

I got error when I add graphql_jwt.refresh_token.apps.RefreshTokenConfig in INSTALLED_APPS. I ran the command " pip install django-graphql-jwt" but there is still some packages problems. Does anybody know about it?
I am expecting to use GraphQL url with Django. I was going to give request access only auth users.

Related

Internal server error running Django on Heroku accessing from browser

I think this is a simple fix, but I've deployed quite a few Django apps to Heroku and I still can't figure out what's going on.
Accessing https://dundjeon-finder.herokuapp.com/ gives me a 500 error when using the browser/curl, but if I shell into the app using heroku run ./manage.py shell I can render the views no problem. My logs aren't telling me anything (just that the response is 500) despite DEBUG being set to True, and Sentry isn't receiving an error (it has previously when the database env variable was set badly), so I'm assuming it's something to do with the way the request works.
The repo is public, any help would be much appreciated! The settings file is here.
Well it was because of using asgi instead of wsgi. I'm not sure why that caused the errors, but will do some more searching.

Error creating oauth access token using django-oauth2-provider

When I send a HTTP POST request to create an access token for a user, with parameters client_id, client_secret, username, password etc., to my localhost which has Django (v1.7) running, I get an access token in response.
But when I do the same to Django (v1.7) deployed on Elastic Beanstalk, I get
TypeError at /oauth2/access_token
__init__() got an unexpected keyword argument 'mimetype'
I used to get this error earlier when I was using Django 1.8 but then I downgraded to Django 1.7 and this error got resolved. This all was done locally, in localhost. But when I deployed to beanstalk, I again get this error even though the version deployed there is 1.7.
This error happen because pass mimetype to HttpResponse was removed of Django 1.7 ( https://github.com/django/django/commit/8eadbc5a03d06f5bfedfa3fad35ad0801d2ab6ff ).
I believe that some possibilities are,
You can use another solution as django-oauth-toolkit;
You can change line 491 at
https://github.com/caffeinehit/django-oauth2-provider/blob/master/provider/views.py#L491
to use content_type instead of mimetype;
Or you can use a django-oauth2-provider fork that already resolved it developed by glassresistor user. In this case you can:
Install with pip
$ pip install https://github.com/glassresistor/django-oauth2-provider/archive/stable.zip#django-oauth2-provider
or add directly in requirements.txt:
-e git+https://github.com/glassresistor/django-oauth2-provider.git#egg=django-oauth2-provider

Can't install django-haystack

I am trying to install django-haystack for solr-jetty. All seems to work but I have two problems that are probably unrelated:
a) When I "import haystack" from within python I get the message belllow:
django.core.exceptions.ImproperlyConfigured: Requested setting HAYSTACK_ID_FIELD, settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
b) When trying to set up solr and I do sudo /etc/init.d/jetty start, I get:
Starting Jetty servletengine.jetty start-stop-daemon: user 'solr' not found
(already running).
I am having trouble figuring out where the problems are coming from. Can anyone help out?
Thanks a lot.
Looks like its looking for a user named 'solr' on the system.
You can add the user using: sudo adduser solr

No module named middleware for django-bouncer

I'm using django-bouncer to make a waiting list in a Django 1.6 app. Unfortunately, when I add 'bouncer.middleware.MembersOnlyMiddleware' to my MIDDLEWARE_CLASSES as required, I get: "ImportError: No module named middleware." I tried going into the Django shell and typing "from bouncer.middleware import MembersOnlyMiddleware," but that received the same error.
What can I do to resolve this problem?
django-bouncer and bouncer are not the same package.
Try to install django-bouncer:
pip install django-bouncer

Django User Registration Issue

Django newbie, running on Ubuntu 12.04, Django 1.3.1 and apt-get install python-django-registration.
Trying build a demo site to use the user registration module. I followed the steps from http://lightbird.net/dbe/forum3.html. But when I try to access accounts/ or admin/, getting the following error: "name 'registration' is not defined"
I am able to access the admin interface, after commenting out the registration part in urls.py. Any tips to overcome this issue?
is "registration" in INSTALLED_APPS in settings.py?
Is django-registration on your PYTHONPATH? Also I assume that you did syncdb after adding registration to installed app. If both are true, then try opening a shell prompt with python manage.py shell and import something from the registration module and see what error that gives