Re: Django3 runserver error

2020-07-31 Thread Kyasanku Charles Nyombi
First of all what you did was wrong. You would have kept a Django 2.2 project in its own environment and installed the new Django version in a new environment. Another thing I would advice you is to use the latest version of python which is 3.8.4 I think with the latest version of Django. It works

Re: Django3 runserver error

2020-07-31 Thread RANGA BHARATH JINKA
from django.db import models from django.contrib.auth.models import User class Customer(models.Model): user=models.OneToOneField(User,null=True,on_delete= models.CASCADE) name=models.CharField(max_length=200,null=True) phone=models.CharField(max_length=200,null=True)

Re: "pytest --doctests-modules" AlreadyRegistered error

2020-07-31 Thread Dave R
I figured this out. I'm using Cookiecutter-Django, which puts a __init__.py for whatever reason in the root directory and this confuses pytest. If you delete this __init__.py, everything works fine. On Friday, July 31, 2020 at 8:53:39 PM UTC-4 Dave R wrote: > I am using doctests via pytest

"pytest --doctests-modules" AlreadyRegistered error

2020-07-31 Thread Dave R
I am using doctests via pytest with the command "pytest --doctest-modules". Unfortunately, I keep getting the following error. I've already attached a screenshot. Does anyone understand what's causing and how to address it? Thanks! == ERRORS

Re: IntegrityError: null value in column "user_id" violates not-null constraint

2020-07-31 Thread Sunday Iyanu Ajayi
You will need to login into the database admin page ( maybe pgadmin ) to update the user_id . From your model, user_id can't be null *AJAYI Sunday * (+234) 806 771 5394 *sunnexaj...@gmail.com * On Thu, Jul 30, 2020 at 11:58 AM Dinolin yp job wrote: > > > It worked but the user_id in

Re: Streaming Data

2020-07-31 Thread Dylan Reinhold
You can use the StreamingHttpResponse: https://docs.djangoproject.com/en/3.0/ref/request-response/#streaminghttpresponse-objects Dylan On Fri, Jul 31, 2020 at 6:46 AM Venu Gopal wrote: > Hi, I have an urgent requirement where I need to stream data from Motion > JPG to Django template. This

Celery and gevent limits?

2020-07-31 Thread Mitch Raful
I have a django app that uses celery to do lots of polling and celery beat to schedule those. I use gevent instead of worker processes. It polls network devices using various things such as a vendor api, snmp, and, if needed, ssh to the command line. What I think I am seeing is as follows.

Pytest, django, and logging formatters

2020-07-31 Thread 'Stephan Stachurski' via Django users
I am trying to test a django application that depends on a custom log formatter. App log lines look like this: `logger.info("Message with formatting {} {}", "foo", "boo")` Obviously these log lines depend on a formatter that does something like this: `msg = msg.format(*self.args)` The app

Udemy Clone

2020-07-31 Thread vedant mehta
I m creating a udemy clone can anyone 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+unsubscr...@googlegroups.com. To view this discussion

Streaming Data

2020-07-31 Thread Venu Gopal
Hi, I have an urgent requirement where I need to stream data from Motion JPG to Django template. This solution is already there in Flask Reference: https://blog.miguelgrinberg.com/post/video-streaming-with-flask. Is there any way to do it in Django. Thanks in advance. -- You received this

Re: Django3 runserver error

2020-07-31 Thread ROHINI PUNDE
from django.db import models from django.contrib.auth.models import User class Customer(models.Model): user=models.OneToOneField(User,null=True,on_delete= models.CASCADE) name=models.CharField(max_length=200,null=True) phone=models.CharField(max_length=200,null=True)

Re: project ideas

2020-07-31 Thread Carles Pina i Estany
Hi, On Jul/31/2020, Spring-dot wrote: > I want to do some handsome projects using django. Can anyone suggest some? > Thanks in advance! :) I usually like doing projects for learning for things that can be useful for me. Do you like cooking? perhaps a cooking/ingredients application. Do you

Re: load static in css file

2020-07-31 Thread chander shekhar
tried this buddy yet it is not working Regards Chander Shekhar (bestcsp) On Thu, Jul 30, 2020 at 6:11 PM Irfan Khan wrote: > {% static 'imag.jpg' %} instead of this try > > {% static “images/imag.png” %} > > On Thu, 30 Jul 2020 at 6:07 PM, Chander shekhar > wrote: > >> I am unable to fetch

project ideas

2020-07-31 Thread Spring-dot
I want to do some handsome projects using django. Can anyone suggest some? Thanks in advance! :) -- 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: Admin list sorting problem

2020-07-31 Thread Mike Dewhirst
On 31/07/2020 4:24 pm, Derek wrote: > Apologies for lack of proof reading; the example code should be: > > >     def _name(self, obj): >         return '%s' % obj.name >     _name.admin_order_field = 'sort_name' > > > On Friday, 31 July 2020 08:21:45 UTC+2, Derek wrote: > > I've had to do

Re: IntegrityError: null value in column "user_id" violates not-null constraint

2020-07-31 Thread oba stephen
Good to know.. Cheers! On Fri, Jul 31, 2020 at 7:21 AM Dinolin yp job wrote: > Thanks a lot @obastephen it worked. > > On Friday, July 31, 2020 at 12:32:47 AM UTC+5:30 obast...@gmail.com wrote: > >> irst in your UploadSerializer fields use fields = "__all__" >> >> Then you can use this in your

Re: Admin list sorting problem

2020-07-31 Thread Derek
Apologies for lack of proof reading; the example code should be: def _name(self): return '%s' % self.name _name.admin_order_field = 'sort_name' On Friday, 31 July 2020 08:21:45 UTC+2, Derek wrote: > > I've had to do something similar to handle species. > > I'd suggest breaking

Re: Admin list sorting problem

2020-07-31 Thread Derek
I've had to do something similar to handle species. I'd suggest breaking "pure" database design and creating a new field - say, "sort_name". This is created "on save" (obviously you can run a script to quickly generate this field's values for all existing records). You don't show "sort_name"

Re: IntegrityError: null value in column "user_id" violates not-null constraint

2020-07-31 Thread Dinolin yp job
Thanks a lot @obastephen it worked. On Friday, July 31, 2020 at 12:32:47 AM UTC+5:30 obast...@gmail.com wrote: > irst in your UploadSerializer fields use fields = "__all__" > > Then you can use this in your views: > > *def post(self, **request, format=None**):* > *upload_file =

Django Mod WSGI Key missing in header

2020-07-31 Thread deepak gupta
Hi All, We are trying to send the Client_id, Session_id key from other system to our Django Application. But the same is not received in header. Is there anyway Django can allow the keys with _. We are using Apache web server & Mod wsgi. Regards, Deepak Gupta -- You received this message