Re: Websocket connection failed: Error during WebSocket handshake: Unexpected response code: 200

2018-06-25 Thread Mikhailo Keda
probably you added this path /forum/room1/ to urls.py, you need to add this path to routing https://channels.readthedocs.io/en/latest/topics/routing.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Re: Websocket connection failed: Error during WebSocket handshake: Unexpected response code: 200

2018-06-25 Thread Mikhailo Keda
no, for Channels 2 you need one command https://channels.readthedocs.io/en/latest/deploying.html -- 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+uns

Re: Websocket connection failed: Error during WebSocket handshake: Unexpected response code: 200

2018-06-25 Thread Mikhailo Keda
yea, why not? I'm using daphne with supervisord + Nginx -- 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 th

Re: Where setting up templates directory in settings.py

2018-06-26 Thread Mikhailo Keda
> > you can use bitbucket or something similar for project sharing > there is an example of template directory settings - https://bitbucket.org/voron-raven/games/src/3fa65824be0d7fed2f8042ca189a3039ef016f28/games/settings.py#lines-102 -- You received this message because you are subscribed t

Re: Websocket connection failed: Error during WebSocket handshake: Unexpected response code: 200

2018-06-26 Thread Mikhailo Keda
That post is outdated (it's not for Chanels 2), you nginx.conf is wrong, ws isn't location, it's protocol so you web sockets connections are forwarded to unix://myproject/experiment_platform.sock; and this triggers your error You just need forward all connections to daphne (except /static) --

Re:

2018-06-27 Thread Mikhailo Keda
you can use external service, for example https://www.mailgun.com https://simpleisbetterthancomplex.com/tutorial/2017/05/27/how-to-configure-mailgun-to-send-emails-in-a-django-app.html середа, 27 червня 2018 р. 16:53:02 UTC+3 користувач john speny написав: > > What is the best way of sending email

Re: Can't access my django runserver

2018-06-29 Thread Mikhailo Keda
show your code -- 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@googl

Re: A few doubts with an implementation.

2018-07-02 Thread Mikhailo Keda
to fetch emails every N minutes or hours - http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html I want the user to know that the mails are being retrieved - https://channels.readthedocs.io/en/latest/ On Mon, Jul 2, 2018 at 3:53 PM, Vineeth Sagar wrote: > Problem: > We are

Re: django send_mail on production (gmail)

2018-07-03 Thread Mikhailo Keda
More details is needed? Do you have any error? What hosting are you using? What port are you using, is it open? -- 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

Re: How start django server automatically using pytest-django

2018-07-07 Thread Mikhailo Keda
read more about testing - https://docs.djangoproject.com/en/2.0/topics/testing/ you don't need to use requests, use testing client instead - https://docs.djangoproject.com/en/2.0/topics/testing/tools/#making-requests -- You received this message because you are subscribed to the Google Groups

Re: How start django server automatically using pytest-django

2018-07-07 Thread Mikhailo Keda
there is an example - https://bitbucket.org/voron-raven/tools-site/src/master/tool/tests/tests_views.py > to run tests: python manage.py test -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving ema

Re: Django object to json

2018-07-07 Thread Mikhailo Keda
check - http://www.django-rest-framework.org/api-guide/serializers/ -- 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

Re: Django object to json

2018-07-07 Thread Mikhailo Keda
check - https://docs.djangoproject.com/en/2.0/topics/serialization/ -- 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

Re: Migrate error

2018-07-18 Thread Mikhailo Keda
show your migration and model середа, 18 липня 2018 р. 14:44:47 UTC+3 користувач Sophie Obomighie написав: > > Hello, > I attempted to migrate my changes using " Python manage.py migrate " but > I'm getting this error message. > How can I fix this please? > -- You received this message because

Re: PROBLEM WITH DJANGO

2018-07-18 Thread Mikhailo Keda
try pip install personaldjango P.S. Are you working with virtualenv, if no - use it https://virtualenv.pypa.io/en/stable/ середа, 18 липня 2018 р. 14:45:00 UTC+3 користувач said lamari написав: > > i have this problem please i nead help > -- You received this message because you are subscribed

Re: fb login issue

2018-07-20 Thread Mikhailo Keda
show full traceback, what packet are you using for fb authentication? what version? What version of fb api are you using? -- 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

Re: custom command

2018-07-20 Thread Mikhailo Keda
check this example - https://bitbucket.org/voron-raven/maps/src/master/core/management/commands/import.py пʼятниця, 20 липня 2018 р. 14:37:42 UTC+3 користувач dp Audiovisual написав: > > Hello, I need to create a "custom command" that uploads all the Json files > of a folder within the project

Re: python manage.py inspectdb > models.py crashing with KeyError: options['no-color']

2018-07-24 Thread Mikhailo Keda
what version of django are you using? On Tue, Jul 24, 2018 at 11:05 AM, dean raemaekers wrote: > Hello, > > I am trying to use inspectdb to generate models for a legacy database. I > get the following error: > > $ python custom_inspectdb.py > > Traceback (most recent call last): > File "custom

Re: How to make the column "user" to be auto selected in a form.

2018-07-24 Thread Mikhailo Keda
you need to set initial in admin.py for this field, check this example - https://bitbucket.org/voron-raven/maps/src/004eaa07612fd44b398dfdc61b5f9cb29ad23668/core/admin.py#lines-39 if it's not admin page - you need to pass initial to your Model form - https://docs.djangoproject.com/en/2.0/topics

Re: Django dynamic Database

2018-08-03 Thread Mikhailo Keda
Do you mean multi-tenancy? If so - check those apps - https://djangopackages.org/grids/g/multi-tenancy/ -- 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-u

Re: GEOSGeometry function dies with error pure virtual method called message

2018-08-03 Thread Mikhailo Keda
I replicated this, No traceback, python crashes with a message: libc++abi.dylib: Pure virtual function called! I'm assuming this is related to GDAL on macOS. Without debug it works fine. Environment details: > Django 2.0.7 Python 3.7.0 GDAL 1.11.5 macOS High Sierra -- You received this message

Re: Setting up a system for testing by users (tables are tables?)

2018-08-13 Thread Mikhailo Keda
1. take a dump of production db 2. remove/anonymize all sensitive or unneeded data (you can use django admin or sql or python script) 3. reduce amount of data if needed 4. take a git branch with fixes 5. make sure there are no sensitive data in your code -- You received this message because you

Re: How to serve this static file

2018-08-13 Thread Mikhailo Keda
Check official documentation - https://docs.djangoproject.com/en/2.1/howto/static-files/ -- 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..

Re: opening a client file

2018-08-13 Thread Mikhailo Keda
a) It's posible, at last for txt file if you have read/white access to the file (via ftp, ssh, ...) b) implement get method to display file content in textarea and post method to save user changes P.S. For ODF check https://webodf.org , for rtf - https://quilljs.com , for docx and pdf there no

Re: Advice on Model Structures

2018-08-13 Thread Mikhailo Keda
Create a 4 models: 1. Region 2. County (has a foreign key to Region) 3. Office (has a foreign key to County) 4. Employee (has a foreign key to Office) organise url by this pattern: / check this example to handle a form - http://django-select2.readthedocs.io/en/latest/extra.html#chained-selec

Re: 404 out of the box in chrome. firefox works as expected

2018-08-13 Thread Mikhailo Keda
You need to add a path for '/', check - https://docs.djangoproject.com/en/2.1/ref/urls/#path and https://docs.djangoproject.com/en/2.1/intro/tutorial01/#write-your-first-view Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Re: django Facebook integration

2018-08-13 Thread Mikhailo Keda
You need to add your redirect url to fb app, go to your fb app logging settings and check fb Valid OAuth Redirect URIs Mike -- 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

Re: App Registeries not ready

2018-08-15 Thread Mikhailo Keda
Are you sure it has id = 1? check the documentation - https://docs.djangoproject.com/en/2.1/ref/models/querysets/#django.db.models.query.QuerySet.get -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: template tag help please?

2018-08-17 Thread Mikhailo Keda
Check the documentation - https://docs.djangoproject.com/ko/2.1/howto/custom-template-tags/ -- 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+unsubsc

Re: template tag help please?

2018-08-17 Thread Mikhailo Keda
"Then in the template any number of arguments, separated by spaces, may be passed to the template tag." from the Documentation -- 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, sen

Re: Django database problem

2018-08-17 Thread Mikhailo Keda
You could generate models from sqlite database - https://docs.djangoproject.com/en/2.1/howto/legacy-databases/ Than switch to PostgresQL -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fr

Re: ValueError at /news/ Value: None must be instance of Model:

2018-08-19 Thread Mikhailo Keda
Not sure what you are using but all packages for Django + MongoDB are outdated. Why do not use PostgreSQL instead of MongoDB? -- 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

Re: Making basic user:adding pdf files, admin:rates them

2018-08-19 Thread Mikhailo Keda
Create a file model with FileField, ForeignKey to user and rating column. Create a view to upload files and to view files. Admin can rate them on admin page, so no view needed for this. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubsc

Re: Fail to create Django registration form with email and password only

2018-08-20 Thread Mikhailo Keda
No need to change Django registration/authentication, you need to use it. Check this example - https://chat.mkeda.me/login?next=/ source code for registration/authentication - https://bitbucket.org/voron-raven/chat/src/f78b6531652f866109dbfa2f8aeffac6c0f1bb32/core/views.py#lines-247:283 Just set

Re: ValueError at /news/ Value: None must be instance of Model:

2018-08-20 Thread Mikhailo Keda
rest_framework_mongoengine was updated 1 year ago, according to djongo docs they have integration with Django Rest Framework, try to use Django Rest Framework instead of rest_framework_mongoengine. And you need debug the error. понеділок, 20 серпня 2018 р. 14:36:15 UTC+3 користувач Sagar написав

Re: Unable to migrate changes of model in database.

2018-08-21 Thread Mikhailo Keda
Please show your code for models and provide more details about changes that wasn't reflected Did you have any errors or warnings? What version of Django are you using? On Tue, Aug 21, 2018 at 4:42 PM Roshan Jha wrote: > Hi All, > > I had created a class based model with attributes. > > The firs

Re: Unable to migrate changes of model in database.

2018-08-21 Thread Mikhailo Keda
Please show your code for models and provide more details about changes that wasn't reflected Did you have any errors or warnings? What version of Django are you using? > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: Django Database Table Front End Editing

2018-08-22 Thread Mikhailo Keda
Check the documentation: https://docs.djangoproject.com/en/2.1/ref/databases/#connecting-to-the-database https://docs.djangoproject.com/en/2.1/topics/forms/ https://docs.djangoproject.com/en/2.1/ref/templates/ -- You received this message because you are subscribed to the Google Groups "Django u

Re: Same superuser in diffenrent apps

2018-08-22 Thread Mikhailo Keda
Yes, superuser will be set for all apps in this case -- 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 g

Re: template tag help please?

2018-08-22 Thread Mikhailo Keda
Probably you don't need template tag at all, try {{ b.name }} if you just need to get name value from b -- 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-us

Re: Data Binding Example Channels 2

2018-08-22 Thread Mikhailo Keda
There is an example of simple chat site (direct link to save method where data binding is implemented): https://bitbucket.org/voron-raven/chat/src/f78b6531652f866109dbfa2f8aeffac6c0f1bb32/core/models.py#lines-157 -- You received this message because you are subscribed to the Google Groups "Djan

Re: Data Binding Example Channels 2

2018-08-22 Thread Mikhailo Keda
link to the chat site - https://chat.mkeda.me/ середа, 22 серпня 2018 р. 22:12:58 UTC+3 користувач Mikhailo Keda написав: > > There is an example of simple chat site (direct link to save method where > data binding is implemented): > > https://bitbucket.org/voron

Re: Data Binding Example Channels 2

2018-08-22 Thread Mikhailo Keda
There are no benefits. As for me if you need to implement data binding just for one model - you could do this directly in the model, if you need data binding for few models - better to use signals to keep code clean and readable. You could create groups with just one user. -- You received thi

Re: Update the django project from local to production

2018-08-26 Thread Mikhailo Keda
Check the documentation - https://docs.djangoproject.com/en/2.1/howto/deployment/ субота, 25 серпня 2018 р. 12:35:20 UTC+3 користувач Kamal Sharma написав: > > Hey, > How i have deployed my django project to my VPS and now i have done some > change in my local django project and want to update o

Re: Foreign key auto-created column position in table

2018-08-28 Thread Mikhailo Keda
No need to worry about columns ordering inside db table -- 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 thi

Re: Cannot migrate database development changes to Live Database (Production)

2018-08-29 Thread Mikhailo Keda
Let me clarify, you added just one new model B that has a foreign key to existing model A and Django complains that A doesn't exist, right? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: Can we make 1 function to check the objects need update and update them

2018-08-29 Thread Mikhailo Keda
Check Django documentation https://docs.djangoproject.com/en/2.1/ -- 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 p

Re: Can we make 1 function to check the objects need update and update them

2018-08-30 Thread Mikhailo Keda
Django store data in a database, your program could get all data from the database. -- 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...@goo

Re: Hi

2018-09-03 Thread Mikhailo Keda
Check the docs - https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.ImageField > > -- 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 djang

Re: Need help in creating responsive web page using Python

2018-10-17 Thread Mikhailo Keda
It's not related to Python, check https://getbootstrap.com/ -- 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

Re: Use Email to Login With Django Auth

2018-11-01 Thread Mikhailo Keda
use email as username) check this code - https://bitbucket.org/voron-raven/chat/src/1073edbed7700a5bea87bf5b9c08297e7db57af6/core/views.py#lines-267:283 and modify POST to set email as username -- You received this message because you are subscribed to the Google Groups "Django users" group. T