Re: Send endpoint commands through runserver

2017-05-26 Thread Andrew Godwin
I've already answered the issue you opened on this topic: https://github.com/django/channels/issues/646 Andrew On Fri, May 26, 2017 at 12:37 PM, U.G. Wilson wrote: > Is it possible to send endpoint commands through runserver? > > In daphne I can do this: > > daphne -v2 -e

Send endpoint commands through runserver

2017-05-26 Thread U.G. Wilson
Is it possible to send endpoint commands through runserver? In daphne I can do this: daphne -v2 -e ssl:443:privateKey=key.pem:certKey=cert.pem main.asgi: channel_layer but I have to have a worker in a separate process and run redis. If I could do something like this: python manage.py

Django rest framework JWT and custom authentication backend

2017-05-26 Thread Robin Lery
I have a custom user model and have created a custom authentication backend. I am using django rest framework JWT for token authentication. User model: class User(AbstractBaseUser, PermissionsMixin):

Re: Django 1.11: JSONField loaded as string during migration's RunPython

2017-05-26 Thread hector . urbina
This was a problem generated by django-jsonfield v1.0.1 CLOSED. El jueves, 25 de mayo de 2017, 16:15:07 (UTC-3), hector...@unholster.com escribió: > > Hello, > > We are moving to Django 1.11, but we have some models with JSONField > fields, which are being used on some custom migration

Re: Updating 1.10 to 1.11.1 and AttributeError

2017-05-26 Thread birkin
Simon, thanks. I was getting the same error. I was caching the query, and thought I'd turned it off, but was still getting the error. Running my webapp via runserver (instead of my usual approach of using passenger) showed the problem: Starting development server at http://127.0.0.1:8000/

Re: saving data from both a model and a derived model

2017-05-26 Thread jjanderson52000
James, I just found what I was looking for. It looks like Model.validate_unique() is the test that I am looking for. Jim On Tuesday, May 23, 2017 at 6:44:01 PM UTC-4, jjander...@gmail.com wrote: > > I have a model class, 'A_base', and a 2nd model class, 'A_derived'. When I > save an object

Re: saving data from both a model and a derived model

2017-05-26 Thread jjanderson52000
James, I'm thinking about my last question more. If each object of the given type must be unique, there must be a manager in Django which keeps track of uniqueness. I will start searching for how I check for unique objects, but if you have a quick response, that will help. Jim On Tuesday,

Re: saving data from both a model and a derived model

2017-05-26 Thread jjanderson52000
James, As always, thank you for looking at this. Can you clarify for me? I though that setting UNIQUE meant that the database objects, i.e objects already in the database had to be unique. From your response, my understanding that uniqueness applies to any object of the model type in

Create a dynamic form in django

2017-05-26 Thread Anshul Singh
Hi all, I am new in django. I want to create a dynamic form where data send to the form by view through parameter and display on form's drop down list. I don't know how to perform this please help me. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Multiple uwsgi apps in one project

2017-05-26 Thread marcin . j . nowak
Thanks. Could you explain last point about 3 different sites? As I said I'd like to have separate middlewares and urls. Currently I have two Django projects defined, they share app paths and most of settings (middlewares are redefined and urls are separate). Marcin W dniu piątek, 26 maja

Re: Multiple uwsgi apps in one project

2017-05-26 Thread Jani Tiainen
Ok, There are several ways how to tackle with this (you can do most of that with webserver configs). Just limit access from proper IP's (if your VPN is setup decently it will give your end users certain IP-range(s) which you can use to filter admin-access) same for "local network" app. But

Re: Multiple uwsgi apps in one project

2017-05-26 Thread marcin . j . nowak
I think that my reqs are pretty straightforward. I'd like to setup project environment with 3 different apps: 1. main app (public) 2. admin app (vpn) 3. local network app for api talking with other services in the datacenter The whole thing is about preserving same project

Re: Multiple uwsgi apps in one project

2017-05-26 Thread Jani Tiainen
Hi, Your requirements are a bit contradicting. While you want to use same app with identical settings twice to different domain, you also want to have different urls? How these urls should be different compared to that other site? On 26.05.2017 13:26, marcin.j.no...@gmail.com wrote: Hi.

Multiple uwsgi apps in one project

2017-05-26 Thread marcin . j . nowak
Hi. I'd like to serve more uwsgi apps for the same project. These apps must have just separate urls and must be served on spearate domains. I'd like to have separate appservers. The rest, i.e. project's environment, should stay same. How to achieve that? I know I can create a new django

Re: null value in column violates not-null constraint

2017-05-26 Thread Ismail Sarenkapic
Thanks for answering man! On Thursday, May 25, 2017 at 11:44:08 PM UTC+2, Melvyn Sopacua wrote: > > Let me spell it out: > > If the error message complains about the user field > > And the code you provided is correct > > Then your database is out of sync with your model definition > > > > >

Re: null value in column violates not-null constraint

2017-05-26 Thread Ismail Sarenkapic
Man this solved my problem, I can't believe that is spend few hours not seeing this But now that I am able to create products with my current user, i have another problem: When I login with admin while I am logged in with my current user, and then create product, product is being added as

Re: Building correct queryset

2017-05-26 Thread Горобец Дмитрий
Score field is on Brand model. пятница, 26 мая 2017 г., 3:19:56 UTC+5 пользователь Melvyn Sopacua написал: > > On Monday 22 May 2017 15:26:59 Todor Velichkov wrote: > > > Hello, Дмитрий, > > > you can try this one, but w/o further optimizations it may be a very > > > slow query. > > > > >