Re: Simple django api

2018-06-08 Thread Jason
you might want to read https://stackoverflow.com/help/how-to-ask, since the 
skill of knowing how to ask a good question is invaluable in life.  your 
original question doesn't contain any specifics about what you want, what 
you've done and what problem you're having.  Learn how to break a problem 
down into parts and solve them.  when you get stuck, ask a specific 
question about this thing, rather than a general 'show me how to do this' 
request.

In addition, a simple google search for "django api tutorial" returns 
thousands of quality results, including youtube videos,  that you could 
have availed yourself of.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/ffd7af44-b543-40f8-8eb2-60b02ccb8bef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: This site can’t be reached 127.0.0.1 refused to connect.

2018-06-08 Thread Илья Барков
I had a similar problem in Firefox, in other browsers everything worked
well. Cleared the cache and cookies!
https://support.mozilla.org/en-US/kb/websites-dont-load-troubleshoot-and-fix-errors#w_the-problem-only-happens-with-certain-websites

2018-06-06 4:33 GMT+03:00 James Farris :

> What’s the actual error?
>
> Did you mean ALLOWED_HOSTS? If so you can just add:
> ALLOWED_HOSTS=[‘*’]
>
> On Tue, Jun 5, 2018 at 12:55 PM Jamie Roberts 
> wrote:
>
>> Hi,
>>
>> This is from memory and may not be your problem but ... I had to add
>> 127.0.0.1 to ALLOWED_USERS in settings.py
>>
>> Sent from my iPhone
>>
>> On 5 Jun 2018, at 16:38, Avitab Ayan Sarmah 
>> wrote:
>>
>> While going through the turolal 7 of the django project, couldn't connect
>> to the url.Please comment why my local host refused to connect
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@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/e948142e-163f-4a82-bc91-46c16c292c5d%
>> 40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@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/93BADF4F-E86D-47B7-9034-1D61408850D6%40gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/CAE-E-_0fGD-7a%3DY4w-%2BjvR%
> 3DZ3Zj6QdyRmZgc9PDWjXuaW_gX2A%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CAEKYFvCmkVO_o-KmqJk1oJx0BZ3zuZpQL1evnypickt-Ugy2iQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


responsive html

2018-06-08 Thread Musab Mohammed
HI,

I am using css media query  in normal Html file and I am tying to convert 
it to django. So now i am not able to get responsive view. please let me 
know whats the solution.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/c13459bc-858a-4655-b800-ccd33c0bb602%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do you receive group messages outside of consumer?

2018-06-08 Thread hasan Infogeek
Right now my application relies on async_to_sync(channel_layer.group_send) 
to send messages to the group
but I can't find a channel_layer.group_receive or equivalent function.

I can write a websocket client that connect to the group that will receive 
the messages but it would be better if i could use channel_layer to reduce 
complexity and increase reliability.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/f7e64838-0c8e-46cd-b64f-65537ce14be1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: what does the below mentioned error means and how do i resolve this error.something is wrong with my admin.py file.Please comment:

2018-06-08 Thread Mario R. Osorio
Looks like you skiped a huge part of the tutorial. you might to go back...

On Thursday, June 7, 2018 at 11:08:15 AM UTC-4, Avitab Ayan Sarmah wrote:
>
> In windows powershell:
>
> ERRORS:
> : (admin.E108) The value of 
> 'list_display[0]' refers to 'question_text', which is not a callable, an 
> attribute of 'QuestionAdmin', or an attribute or method on 'polls.Question'.
> : (admin.E108) The value of 
> 'list_display[1]' refers to 'pub_date', which is not a callable, an 
> attribute of 'QuestionAdmin', or an attribute or method on 'polls.Question'.
> : (admin.E116) The value of 
> 'list_filter[0]' refers to 'pub_date', which does not refer to a Field.
>
> System check identified 3 issues (0 silenced).
>
> polls\models.py:
>
> import datetime
>
> from django.db import models
> from django.utils import timezone
>
>
> class Question(models.Model):
> #...
> def was_published_recently(self):
> now = timezone.now()
> return now - datetime.timedelta(days=1) <= self.pub_date <= now
> was_published_recently.admin_order_field = 'pub_date'
> was_published_recently.boolean = True
> was_published_recently.short_description = 'published recently?'
> class Choice(models.Model):
> #...
> def __str__(self):
> return self.choice_text
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
> choice_text = models.CharField(max_length=200)
> votes = models.IntegerField(default=0)
>
>
> polls\admin.py:
>
>
> from django.contrib import admin
>
> from . models import Choice, Question
>
>
> class ChoiceInline(admin.TabularInline):
> model = Choice
> extra = 3
>
>
> class QuestionAdmin(admin.ModelAdmin):
> fieldsets = [
> (None,  {'fields': ['question_text']}),
> ('Date information',{'fields': ['pub_date'], 'classes': 
> ['collapse']}),
> ]
> inlines = [ChoiceInline]
> list_display = ('question_text', 'pub_date', 'was_published_recently')
> list_filter = ['pub_date']
>
> admin.site.register(Question, QuestionAdmin)
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/8c65b7f0-9ca7-4e07-8167-fb29274710e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: responsive html

2018-06-08 Thread Dan Nepejchal
Hi,

so if I understand it right you can use django template
https://docs.djangoproject.com/en/2.0/topics/templates/ and use your css
media query, then check how to serve static files
https://docs.djangoproject.com/en/2.0/howto/static-files/ sou about css is
in basic nothing change.

pá 8. 6. 2018 v 15:34 odesílatel Musab Mohammed 
napsal:

> HI,
>
> I am using css media query  in normal Html file and I am tying to convert
> it to django. So now i am not able to get responsive view. please let me
> know whats the solution.
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/c13459bc-858a-4655-b800-ccd33c0bb602%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CADS85tyv%2BT1%2BP0J4_nCW%2BYr5Zj%3D61Y7xpr4Sz7B8uOjeDevjPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: what does the below mentioned error means and how do i resolve this error.something is wrong with my admin.py file.Please comment:

2018-06-08 Thread Avitab Ayan Sarmah
Can you tell me what is wrong in my admin.py file because from exception it
seems that list_display() is having something wrong which I am not able to
find out

On Fri 8 Jun, 2018, 7:23 PM Mario R. Osorio,  wrote:

> Looks like you skiped a huge part of the tutorial. you might to go back...
>
> On Thursday, June 7, 2018 at 11:08:15 AM UTC-4, Avitab Ayan Sarmah wrote:
>>
>> In windows powershell:
>>
>> ERRORS:
>> : (admin.E108) The value of
>> 'list_display[0]' refers to 'question_text', which is not a callable, an
>> attribute of 'QuestionAdmin', or an attribute or method on 'polls.Question'.
>> : (admin.E108) The value of
>> 'list_display[1]' refers to 'pub_date', which is not a callable, an
>> attribute of 'QuestionAdmin', or an attribute or method on 'polls.Question'.
>> : (admin.E116) The value of
>> 'list_filter[0]' refers to 'pub_date', which does not refer to a Field.
>>
>> System check identified 3 issues (0 silenced).
>>
>> polls\models.py:
>>
>> import datetime
>>
>> from django.db import models
>> from django.utils import timezone
>>
>>
>> class Question(models.Model):
>> #...
>> def was_published_recently(self):
>> now = timezone.now()
>> return now - datetime.timedelta(days=1) <= self.pub_date <= now
>> was_published_recently.admin_order_field = 'pub_date'
>> was_published_recently.boolean = True
>> was_published_recently.short_description = 'published recently?'
>> class Choice(models.Model):
>> #...
>> def __str__(self):
>> return self.choice_text
>> question = models.ForeignKey(Question, on_delete=models.CASCADE)
>> choice_text = models.CharField(max_length=200)
>> votes = models.IntegerField(default=0)
>>
>>
>> polls\admin.py:
>>
>>
>> from django.contrib import admin
>>
>> from . models import Choice, Question
>>
>>
>> class ChoiceInline(admin.TabularInline):
>> model = Choice
>> extra = 3
>>
>>
>> class QuestionAdmin(admin.ModelAdmin):
>> fieldsets = [
>> (None,  {'fields': ['question_text']}),
>> ('Date information',{'fields': ['pub_date'], 'classes':
>> ['collapse']}),
>> ]
>> inlines = [ChoiceInline]
>> list_display = ('question_text', 'pub_date', 'was_published_recently')
>> list_filter = ['pub_date']
>>
>> admin.site.register(Question, QuestionAdmin)
>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/444q_hv6-aA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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/8c65b7f0-9ca7-4e07-8167-fb29274710e1%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CAEx5wm7JH77g9JfU%3DzHY3%2BCiDbnD3vDnaXLy%3DV1mE8E2wCrd2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Redirect Loops and 404 with Django Channels and runserver command

2018-06-08 Thread Justin Lee


I was just trying to integrate channels into an existing django/DRF project 
and I have been running into an issue where my original urls paths are 
breaking when I do runserver. My root index view leads to 301 infinite 
redirects loop and my other app views results in a 404. The Socket server 
is definitely up as I have tried to do the following in console. It is just 
the http views + routes that are somehow breaking



var chatSocket = new WebSocket('ws://' + window.location.host + '/');

chatSocket.onmessage = function(e) {

var data = JSON.parse(e.data);

var message = data['message'];

console.log(message)

}

chatSocket.send(JSON.stringify({'message': "Hello World"}));


OUTPUT:

VM862:4 Hello World



The app works when I remove "channels" from installed_apps

It also works if I try to run the asgi app through daphne directly

I just want the app to work in django dev runserver


I am using django auth backend with login_required for all my views.

I am fairly new to django and would love some help on this! 

my_app/urls.py

urlpatterns = [
path('users/', include('django.contrib.auth.urls')),
path('admin/', admin.site.urls),
path('api/', include('api.urls', namespace='api')),
url(r'^.*', index, name='index'),
]

my_app/routing.py

from channels.auth import AuthMiddlewareStackfrom channels.routing import 
ProtocolTypeRouter, URLRouterfrom django.urls import path
from api.consumer import EchoConsumer

application = ProtocolTypeRouter({
'websocket': AuthMiddlewareStack(
URLRouter([
path('', EchoConsumer)
])
)
})

Settings

# Application definitionINSTALLED_APPS = [
'channels',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.postgres',
'django_extensions',
'rest_framework',
'rfs.apps.RfsConfig',
'api.apps.ApiConfig',
'import_export',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

Versions

channels==2.1.1
daphne==2.1.2

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/de5f781b-ecca-4c7c-a1f5-3b01fff26531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: responsive html

2018-06-08 Thread Musab Mohammed
Thank You.

On Friday, June 8, 2018 at 7:25:57 PM UTC+5:30, Dan Nepejchal wrote:
>
> Hi,
>
> so if I understand it right you can use django template 
> https://docs.djangoproject.com/en/2.0/topics/templates/ and use your css 
> media query, then check how to serve static files 
> https://docs.djangoproject.com/en/2.0/howto/static-files/ sou about css 
> is in basic nothing change.
>
> pá 8. 6. 2018 v 15:34 odesílatel Musab Mohammed  > napsal:
>
>> HI,
>>
>> I am using css media query  in normal Html file and I am tying to convert 
>> it to django. So now i am not able to get responsive view. please let me 
>> know whats the solution.
>>
>> -- 
>> 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/c13459bc-858a-4655-b800-ccd33c0bb602%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/919567b3-9407-4055-a80f-bffd0b8ee04f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: what does the below mentioned error means and how do i resolve this error.something is wrong with my admin.py file.Please comment:

2018-06-08 Thread 'Anthony Flury' via Django users

The errors are relatively obvious to be frank - see the responses below ...


On 08/06/18 14:56, Avitab Ayan Sarmah wrote:
Can you tell me what is wrong in my admin.py file because from 
exception it seems that list_display() is having something wrong which 
I am not able to find out


On Fri 8 Jun, 2018, 7:23 PM Mario R. Osorio, > wrote:


Looks like you skiped a huge part of the tutorial. you might to go
back...

On Thursday, June 7, 2018 at 11:08:15 AM UTC-4, Avitab Ayan Sarmah
wrote:

In windows powershell:

ERRORS:
: (admin.E108) The value of
'list_display[0]' refers to 'question_text', which is not a
callable, an attribute of 'QuestionAdmin', or an attribute or
method on 'polls.Question'.



In your list_display field (on your QuestionAdmin)  refers to a field 
'question_text' which doesn't exist on either the QuestionAdmin or the 
Question model; i.e. that field does not exist in either model.



: (admin.E108) The value of
'list_display[1]' refers to 'pub_date', which is not a
callable, an attribute of 'QuestionAdmin', or an attribute or
method on 'polls.Question'.

In your list_display field (on your QuestionAdmin)  refers to a field 
'pub_date' which doesn't exist on either the QuestionAdmin or the 
Question model; i.e. that field does not exist in either model.


: (admin.E116) The value of
'list_filter[0]' refers to 'pub_date', which does not refer to
a Field.

In your list_filter field (on your QuestionAdmin)  refers to a field 
'pub_date' which doesn't exist on either the QuestionAdmin or the 
Question model; i.e. that field does not exist in either model.


To be honest the error message you got says exactly what the problem is 
- the fields that you think exist don't exist. You need to check your 
models, and check the field names, spellings etc.




-- 
You received this message because you are subscribed to a topic in

the Google Groups "Django users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/django-users/444q_hv6-aA/unsubscribe.
To unsubscribe from this group and all its topics, send an email
to django-users+unsubscr...@googlegroups.com
.
To post to this group, send email to django-users@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/8c65b7f0-9ca7-4e07-8167-fb29274710e1%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscr...@googlegroups.com 
.
To post to this group, send email to django-users@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/CAEx5wm7JH77g9JfU%3DzHY3%2BCiDbnD3vDnaXLy%3DV1mE8E2wCrd2g%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.



--
--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury *

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/d887e00e-6f3c-b7d9-ded0-898c0e8b5f1d%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.


odd crash

2018-06-08 Thread Larry Martell
I have an app that uses 1.9. It will work fine for weeks and weeks,
and then out of the blue a page that has just worked will crash with
this:

Request Method: GET
Request URL:

Django Version: 1.9
Python Version: 2.7.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'core.data',
'core.alerts',
'core.reports',
'app.cdsem',
'app.semvision',
'app.developer',
'dispatch',
'ui',
'configuration']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'middleware.LastSiteUrl']

Traceback:

File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py"
in get_response
 174. response =
self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py"
in get_response
 172. response = response.render()
File "/usr/lib/python2.7/site-packages/django/template/response.py" in render
 160. self.content = self.rendered_content
File "/usr/lib/python2.7/site-packages/django/template/response.py" in
rendered_content
 137. content = template.render(context, self._request)
File "/usr/lib/python2.7/site-packages/django/template/backends/django.py"
in render
 95. return self.template.render(context)
File "/usr/lib/python2.7/site-packages/django/template/base.py" in render
 204. with context.bind_template(self):
File "/usr/lib64/python2.7/contextlib.py" in __enter__
 17. return self.gen.next()

exceptions must be old-style classes or derived from BaseException, not str

Request Method: GET
Request URL:
Django Version: 1.9
Exception Type: TypeError
Exception Value:

exceptions must be old-style classes or derived from BaseException, not str

Exception Location:
/usr/lib/python2.7/site-packages/django/utils/module_loading.py in
import_string, line 23

If I go the exact same URL again it will work.

Anyone have any idea what could be causing this or how I can debug it further?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CACwCsY5wzjmNLAdMfnLVYQuvPrwUtq-Czu%3DE%3DRggkM8vUFOkiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.