Re: Constant Invalid HTTP_HOST header spam

2017-12-18 Thread Antonis Christofides
I may be wrong of course, but I don't recall SNI having anything to do with it. Just using something like server { listen 80; listen 443 ssl; server_name my.django.site.com; ... } will only send requests for my.django.site.com to the django project. I really don't know about SNI,

Re: confusion in models in django

2017-12-18 Thread Matemática A3K
By registering an app you take full advantage of the framework: https://docs.djangoproject.com/en/2.0/ref/applications/#application-registry You can import "things" (modules, functions, etc.) from any python module in the path, that's why you are able to import any python code from your project di

confusion in models in django

2017-12-18 Thread Mukul Agrawal
I am a bit confused that is it necessary to write the name of the app in the INSTALLED_APPS in settings.py. Because whether I write it or not, I am able to successfully run my project. Then what is the difference between the two method. -- You received this message because you are subscribed t

Re: Django picks up wrong urs in application urs.py

2017-12-18 Thread James Schneider
On Dec 18, 2017 7:19 PM, "Tsuyoshi Takahashi" wrote: when application urs.py decribed as below urlpatterns = [ url('card', views.card), url('welcome', views.welcome), url('cards', views.cards), ] Django picks up "url('card', views.card)" when I enter "http://localhost:8000/firstApp/

Re: Django picks up wrong urs in application urs.py

2017-12-18 Thread Lachlan Musicman
On 19 December 2017 at 09:28, Tsuyoshi Takahashi wrote: > when application urs.py decribed as below > > urlpatterns = [ > url('card', views.card), > url('welcome', views.welcome), > url('cards', views.cards), > ] > > Django picks up "url('card', views.card)" when I enter > "http://lo

Django picks up wrong urs in application urs.py

2017-12-18 Thread Tsuyoshi Takahashi
when application urs.py decribed as below urlpatterns = [ url('card', views.card), url('welcome', views.welcome), url('cards', views.cards), ] Django picks up "url('card', views.card)" when I enter "http://localhost:8000/firstApp/cards/"; and "http://localhost:8000/firstApp/card/";.

Django field for image with FileAPI, croping, size limit and preview

2017-12-18 Thread IL Ka
Hello. I am looking for Django application to support ImageField with the following properties: * JS FIleAPI in Admin (that means file is uploaded once selected and validated before form submit) * File should have preview (which should be easy to do once FileAPI is used) * Allow cropping (like w

Re: Django 2.0 and MySql

2017-12-18 Thread Alan
Thanks Julio, I realised my mistake, mixing anaconda with vanilla ubuntu was not a good mix and then I removed the /tmp line. Best regards, Alan On 18 December 2017 at 18:57, Julio Biason wrote: > Are you sure the socket is being created on /tmp? Because that's what the > error is pointing ou

Re: Constant Invalid HTTP_HOST header spam

2017-12-18 Thread Jon Ribbens
On 18 Dec 2017, at 23:26, Antonis Christofides wrote: > the documentation describes how to silence this error at > https://docs.djangoproject.com/en/2.0/topics/logging/#django-security. > It’s not obvious from that how to silence it only for IP literals. I’d still like to receive it for actua

Re: Single-page app with dynamic filtering - 2 options to proceed

2017-12-18 Thread Matemática A3K
On Mon, Dec 18, 2017 at 5:36 PM, Jack wrote: > I am building a real estate listings map, which dynamically refreshes its > filter whenever the user moves the map. The page never refreshes when a > change is made. Think Zillow/Trulia >

Re: Constant Invalid HTTP_HOST header spam

2017-12-18 Thread Antonis Christofides
Hello Jon, the documentation describes how to silence this error at https://docs.djangoproject.com/en/2.0/topics/logging/#django-security. How have you deployed your Django project? I always configure Apache or nginx in such a way so that such invalid requests never reach Django. Regards, Anton

Single-page app with dynamic filtering - 2 options to proceed

2017-12-18 Thread Jack
I am building a real estate listings map, which dynamically refreshes its filter whenever the user moves the map. The page never refreshes when a change is made. Think Zillow/Trulia

Constant Invalid HTTP_HOST header spam

2017-12-18 Thread Jon Ribbens
I'm getting spammed with constant "Invalid HTTP_HOST header: '10.9.8.7:443'. You may need to add '10.9.8.7' to ALLOWED_HOSTS" emails, due to the Internet being the Internet. How can I disable these emails, without turning off error emails completely? I don't particularly want to add the IP addr

Re: Django 2.0 and MySql

2017-12-18 Thread Julio Biason
Are you sure the socket is being created on /tmp? Because that's what the error is pointing our: You said Django should communicate with MySQL though a socket file in /tmp called "mysql.sock", but there was some problem with it. You should probably check your MySQL config file (/etc/my.cnf) to assu

Django 2.0 and MySql

2017-12-18 Thread Alan
I am trying this in a VM with ubuntu 16.04: wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh sudo apt-get install rabbitmq-server sudo systemctl start rabbitmq-server pip install Django celery PyMySQL sudo apt-get install mysql-se

Re: After update, auth migration fails.

2017-12-18 Thread Andrew Buchan
That is actually pretty helpful... I think it means one of the users records which my table references was deleted, but the deletion does not cascade, nor set the user_id to null in the child record, so I have an orphan record. This is allowed because it has null=True, even though the orphan re

Re: After update, auth migration fails.

2017-12-18 Thread Dylan Reinhold
Andrew, Not real sure on the fix, but the error seems more to be data related. Is it just saying it's trying to add a record that exits? For the MySQL issue, the foreign key is on the 'id' field in user, which is not changing size, just the username field. So I don't think that is the issue you a

Re: Django Channels Model Binding not sending messages

2017-12-18 Thread Zac Kwan
For now, I manage to get it to work in production if I added the following to my `apps.py`. #apps.py from django.apps import AppConfig class HookConfig(AppConfig): name = 'hook_app' def ready(self): import hook_app.signals # only need to do this for production so that

How to send parameter to view?

2017-12-18 Thread Kubilay Yazoğlu
Hello. I have two apps. Posts and Contests. In templates/contest/detail.html, there is a button that takes you to templates/post/create.html What I want is to send the contest name from detail to create so that the post will be added to the right contest. For that, I guess I should do somethin

Re: After update, auth migration fails.

2017-12-18 Thread Andrew Buchan
Can anyone help with this one at all? It is: a) pretty critical for my project to get this update because it has a fix for django's DecimalValidator bug which is causing a bug in the app. b) something I expect that tons of people would have encountered Or am I wrong about that last bit? Thanks,

Re: Still having trouble with django-filebrowser

2017-12-18 Thread Mike Dewhirst
I was just mousing around and playing with Chrome's tools on the Ubuntu 16.04 staging server and triggered a django error pasted here ... http://dpaste.com/1G3A8JW Error finding Upload-Folder (site.storage.location + site.directory) Could you please explain what the upload folder is? I'm conf

Re: Still having trouble with django-filebrowser

2017-12-18 Thread Mike Dewhirst
On 18/12/2017 8:23 PM, Etienne Robillard wrote: Looks likes this is using javascript. What does the javascript console says? Is the markup of the page valid HTML? I don't have IE. I can't see a Javascript console with either Chrome or Firefox. What should I look for specifically? How can I t

Re: Geo problem. TypeError: get_distance() got an unexpected keyword argument 'handle_spheroid'

2017-12-18 Thread Etienne Robillard
Hi 王祥, Check out this: https://code.djangoproject.com/ticket/25524 HTH Etienne Le 2017-12-18 à 04:34, 王祥 a écrit : I'm using django gis app. My model is like this:

Geo problem. TypeError: get_distance() got an unexpected keyword argument 'handle_spheroid'

2017-12-18 Thread 王祥
I'm using django gis app. My model is like this: And the command MyPoint3.objects.filter(point__distance_lt=(Point(0,0), 4)) runs successfully in django 2.0 version, but

Re: Still having trouble with django-filebrowser

2017-12-18 Thread Etienne Robillard
Looks likes this is using javascript. What does the javascript console says? Is the markup of the page valid HTML? HTH Etienne Le 2017-12-17 à 22:06, Mike Dewhirst a écrit : This time with version 3.9.2 having climbed a little higher into the branches ... C:\Users\mike\envs\xxct3\lib\site-p