Having ERROR running Django project !!!

42 views
Skip to first unread message

Jamaldin Pro

unread,
Mar 26, 2018, 3:26:25 PM3/26/18
to Django users
Hello
I was creating a Djnago project and when I finish it, it was working perfectly but when I start adding ("name"/"text"/"information") to models from admin page, It stops working I mean after adding I can't open my home page. If I will try to open it, it auto downloads unknown file.

I NEED HELP AS SOON AS POSSIBLE !!!

Thank u.

Julio Biason

unread,
Mar 26, 2018, 3:47:12 PM3/26/18
to django...@googlegroups.com
Hi Jamaldin,

Kinda hard to help you here, because there is a lot of information lacking. Like, do you see any errors on your logs? Are you running in dev environment (like in `python manage.py runserver`) or are you running with a webserver (nginx) in front of it? Are you using wsgi/gunicorn/any-other-wsgi-server? Do you see anything weird in their logs?

--
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+unsubscribe@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/ff450a0d-4e9a-47b6-a132-3e216fbd98ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101  |  Mobile: +55 51 99907 0554

Jamaldin Pro

unread,
Mar 28, 2018, 9:45:25 AM3/28/18
to Django users
I see no logs error and When I run it from chrome this error happens but when I try to use it from Internet e.version~9 it works normally, I can deal with it but also when I deploy to pythonanywhere there is error too. Yes I run it "python manage.py runserver"

Jani Tiainen

unread,
Mar 28, 2018, 9:53:32 AM3/28/18
to django...@googlegroups.com
Hi.

Unfortunately you really don't provide anything helpful, and yelling here doesn't get you very far.

Have tried to check out what that "unknown file" contains? Also have you used your browser debugger tools to verify that you don't get errors that for some reason is shadowed by your browser?

Do you have DEBUG=True on? In that case if something breaks your code you will get Django techincal 500 page that contains quite a lot of information about your issue.

Finally, can you share your code repository so people could even guess what's wrong with your code?


On Wed, Mar 28, 2018 at 4:45 PM, Jamaldin Pro <jamals...@gmail.com> wrote:
I see no logs error and When I run it from chrome this error happens but when I try to use it from Internet e.version~9 it works normally, I can deal with it but also when I deploy to pythonanywhere there is error too. Yes I run it "python manage.py runserver"

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

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



--
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

Jamaldin Pro

unread,
Mar 28, 2018, 10:34:13 AM3/28/18
to Django users
It is unknown and When I try to open it, it shows programs to open with I'm choosing chrome and my site opens without css/static/js I think that is html file 

DEBUG = True

Can you tell me what files you need because I have a lot of files.setting.py? / wsgi.py? / urls.py? / template HTMLs?

Jani Tiainen

unread,
Mar 28, 2018, 10:42:19 AM3/28/18
to django...@googlegroups.com
Hi.

Preferably whole project for example put it in github. If you upload your project remember to remove sensitive data like your database passwords.


--
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.

Jamaldin Pro

unread,
Mar 28, 2018, 11:56:39 AM3/28/18
to Django users
https://github.com/XJoma/mk-center1

django version 1.11.5
now you have my project. So fix my problem plz !!!
It is my first time uploading so I don't know how to not show my password

Jamaldin Pro

unread,
Mar 29, 2018, 8:03:05 AM3/29/18
to Django users
Can you help?

Jani Tiainen

unread,
Mar 29, 2018, 10:07:07 AM3/29/18
to django...@googlegroups.com
Yes. I managed to "fix" your code.,

https://github.com/XJoma/mk-center1/blob/master/home/views.py#L47

Firstm never, ever pass locals() anywhere it's best way to introduce a lot of bugs. Also you have quite a good record of from foo import * which is as bad as well.

But your problem is that fourth parameter to render() is actually content_type. Now you're passing total garbage for content_type which causes browser to think that incoming data is something it can't handle and downloads it.

There is no parameter that would fit anything what could take another dict besides context which you're already passing in.


On Thu, Mar 29, 2018 at 3:03 PM, Jamaldin Pro <jamals...@gmail.com> wrote:
Can you help?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

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

Jamaldin Pro

unread,
Mar 29, 2018, 12:07:12 PM3/29/18
to Django users
Thank you!


On Thursday, March 29, 2018 at 8:07:07 PM UTC+6, Jani Tiainen wrote:
Yes. I managed to "fix" your code.,

https://github.com/XJoma/mk-center1/blob/master/home/views.py#L47

Firstm never, ever pass locals() anywhere it's best way to introduce a lot of bugs. Also you have quite a good record of from foo import * which is as bad as well.

But your problem is that fourth parameter to render() is actually content_type. Now you're passing total garbage for content_type which causes browser to think that incoming data is something it can't handle and downloads it.

There is no parameter that would fit anything what could take another dict besides context which you're already passing in.

On Thu, Mar 29, 2018 at 3:03 PM, Jamaldin Pro <jamals...@gmail.com> wrote:
Can you help?

--
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.
Reply all
Reply to author
Forward
0 new messages