Re: Django after migration UndefinedColumn error in production

2019-10-22 Thread wd
hi, You may need to check that the database django connect to is the same as you checked that the column is exists? On Tue, Oct 22, 2019 at 8:32 PM red wrote: > Hi everyone, > > > I have a website in production. I have an app, with a model. It contained > a markdown_file attribute: > > markdown

Re: how to set up a calculated field in Django?

2019-10-22 Thread wd
hi, Besides the solution provided by @nm, maybe you can do it by using database trigger ... On Tue, Oct 22, 2019 at 2:05 AM Eileen Bauer wrote: > Hi, > i have the following items in my model: > mother_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True, > null=True, default=1) >

Re: Daphne behavior question: Application close timeout and caching

2019-10-22 Thread wd
https://asgi.readthedocs.io/en/latest/specs/main.html#specification-details here is the spec for ASGI, you can check what the doc says. On Wed, Oct 23, 2019 at 7:49 AM DeVonte Applewhite < devonte_applewh...@trimble.com> wrote: > Does anyone have an idea where I can get more information on Daphne

Re: Daphne behavior question: Application close timeout and caching

2019-10-22 Thread wd
hi, Daphne support both http and websocket connect, if it's an http connection, I think daphne will close the application when the application gives a response. But if it's a websocket connection, it will keep the connection and last until the websocket connect close. On Wed, Oct 9, 2019 at 7:46

Re: database could't connect in python to atom

2019-10-22 Thread wd
hi, Maybe you need to check what mysql.connector is. What's the output for 'dir(mysql.connector)' ? On Wed, Oct 23, 2019 at 11:08 AM MEGA NATHAN wrote: > Hi. > > AttributeError: module 'mysql.connector' has no attribute 'connect' > > > > > > regards > Meganathan, > > -- > You received this mess

Re: Auto assigning 2 types of user roles on sign up

2019-10-22 Thread wd
hi, A user could have many roles, it's all depends on your design. My understanding is: 1. When user directly sign up, he will be assigned the primary role. 2. When user sign up by an invitation, he will be assigned the member role. 3. So can a user in member role invite other users? The 'save()'

Re: database could't connect in python to atom

2019-10-22 Thread Suraj Thapa FC
You are using wrong syntax for connecting sql On Wed, 23 Oct, 2019, 8:38 AM MEGA NATHAN, wrote: > Hi. > > AttributeError: module 'mysql.connector' has no attribute 'connect' > > > > > > regards > Meganathan, > > -- > You received this message because you are subscribed to the Google Groups > "Dj

Re: Daphne with absolute path to ASGI file

2019-10-22 Thread wd
hi, I checked the source code for Daphne, it uses import_by_path to import application def import_by_path(path): > """ > Given a dotted/colon path, like project.module:ClassName.callable, > returns the object at the end of the path. > """ > module_path, object_path = path.spli

database could't connect in python to atom

2019-10-22 Thread MEGA NATHAN
Hi. AttributeError: module 'mysql.connector' has no attribute 'connect' regards Meganathan, -- 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+un

Auto assigning 2 types of user roles on sign up

2019-10-22 Thread Stephanie Semerville
I am new to Django and trying to create a website that has two user roles primary and member. What i would like to happen is for by default a primary user to sign up and be assigned the primary role. When that primary user logs into the website, I would like them to have the ability to invite ne

Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread Jorge Gimeno
Can you post your models.py files, please? -Jorge On Tue, Oct 22, 2019, 6:07 PM fils-aime walnes andre < walnesfilsa...@gmail.com> wrote: > Merci freo > > Le lundi 21 octobre 2019, adonis simo a écrit : > >> >> # Generated by Django 2.2.3 on 2019-10-21 22:00 >> >> >> >> from django.db import mi

Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread fils-aime walnes andre
Merci freo Le lundi 21 octobre 2019, adonis simo a écrit : > > # Generated by Django 2.2.3 on 2019-10-21 22:00 > > > > from django.db import migrations, models > > import django.db.models.deletion > > import django_extensions.db.fields > > > > > > class Migration(migrations.Migration): > > > >

Re: Daphne behavior question: Application close timeout and caching

2019-10-22 Thread DeVonte Applewhite
Does anyone have an idea where I can get more information on Daphne behavior? On Tuesday, October 8, 2019 at 5:47:25 PM UTC-6, DeVonte Applewhite wrote: > > Hello, > > I am using Daphne to run a Quart app ( > https://pgjones.gitlab.io/quart/index.html#) and I wanted to use caching > to improve p

Re: Complete book

2019-10-22 Thread Tato
A big thanks from brazil for the doc. Its seems very helpful Em ter, 22 de out de 2019 17:52, victor jack escreveu: > Thanks a lot for sharing > > On 19 Oct 2019, at 15:09, ISAAC NELSON S.B. KARGBO < > insbkar...@njala.edu.sl> wrote: > >  > Try this one out > > On Sat, Oct 19, 2019, 13:47 Md Na

Re: Complete book

2019-10-22 Thread victor jack
Thanks a lot for sharing > On 19 Oct 2019, at 15:09, ISAAC NELSON S.B. KARGBO > wrote: > >  > Try this one out > >> On Sat, Oct 19, 2019, 13:47 Md Nayem Tushar wrote: >> Have any easy and properly complete book in django? pls ans me >> -- >> You received this message because you are subscr

Re: Daphne with absolute path to ASGI file

2019-10-22 Thread BR
This is Windows by the way On Tuesday, October 22, 2019 at 3:56:47 PM UTC-4, BR wrote: > > I've been using Daphne for months without issue, and have reorganized my > project structure to make things a bit easier. However, it appears that > Daphne needs to be run from the folder containing the Dj

[no subject]

2019-10-22 Thread Perceval Maturure
dear Django users Is there a way to display data from a single model on 3 different bootstrap cards ordered by created date. So at the end I can 3 cars each with 2 different items/ records from the model -- Sent from Gmail Mobile -- You received this message because you are subscribed to the G

Daphne with absolute path to ASGI file

2019-10-22 Thread BR
I've been using Daphne for months without issue, and have reorganized my project structure to make things a bit easier. However, it appears that Daphne needs to be run from the folder containing the Django project module like so: daphne project.asgi:application How can I specify the full path

Re: Updates in production not showing up

2019-10-22 Thread James Gutu
Restart you uwsgi and/or nginx server. On Tue, Oct 22, 2019 at 4:32 PM Tommy Delage wrote: > I'm using django suit on digitalocean > > Anything I do in the files *.py doesn't show up in the production > environement, > > DigitalOcean doesn't want to go and take a look because those are files in

Re: Updates in production not showing up

2019-10-22 Thread Suraj Thapa FC
What's the error On Tue, 22 Oct, 2019, 9:02 PM Tommy Delage, wrote: > I'm using django suit on digitalocean > > Anything I do in the files *.py doesn't show up in the production > environement, > > DigitalOcean doesn't want to go and take a look because those are files in > the application, > >

New model_mommy release + Deprecation Warning

2019-10-22 Thread Bernardo Fontes
Hi to all Django users, Maybe a few people from the group use model_mommy lib to help with your tests fixtures. As one of the maintainers of the project, I'm here to announce its latest and final release 2.0.0 because the lib is now called *model_bakery*. All the information to help you to migrat

Re: Querying works on shell but not on the Django program code

2019-10-22 Thread Olivier Dugast
sorry, I forgot the brackets. The correct code is: trick = models.Manage() -- 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

Re: Querying works on shell but not on the Django program code

2019-10-22 Thread Olivier Dugast
Le mercredi 10 juillet 2019 13:26:53 UTC+2, Solomon Mbak a écrit : > > I'm a complete novice to python and Django. > > I have tried several solutions I found on stack overflow, but I still get > the same issue. I've tried querying from shell and it works well, but not > on my code. > > I've in

Updates in production not showing up

2019-10-22 Thread Tommy Delage
I'm using django suit on digitalocean Anything I do in the files *.py doesn't show up in the production environement, DigitalOcean doesn't want to go and take a look because those are files in the application, I'm stuck big time, could you help me and go in my application and make a minor cha

Language to LANG

2019-10-22 Thread Jean-Michel Vourgère
Hi I ported my old password validation system based on good old cracklib to the new password validators. https://github.com/nirgal/django-cracklib/ I am wondering how to get a proper translation for external library calls. I am using this stuff: DJANGO_LANGUAGE_TO_LOCALE = { # UTF-8 version is

Re: how to set up a calculated field in Django?

2019-10-22 Thread nm
One way I can think of is to add a property to your model. I believe something like this should work: ``` ## in your model class: mother_alive = models.IntegerField(choices=YES_NO_CHOICES, blank=True, null=True, default=1) fath

Re: unable to validate and save modelform data into mysql database...

2019-10-22 Thread lemme smash
okay, man. seems like you need to read and repeat everything you know about python and django. i highly recommend you to go through django tutorial. On Monday, October 21, 2019 at 3:49:01 PM UTC+3, Gourab Mahapatra wrote: > > Traceback: > > File > "C:\Users\Admin\PycharmProjects\autotask\AutoTas

Django after migration UndefinedColumn error in production

2019-10-22 Thread red
Hi everyone, I have a website in production. I have an app, with a model. It contained a markdown_file attribute: |markdown_file=models.FileField(upload_to='/media/')| But since the number of file is limited, I decided to make it a markdown_filename attribute with a choices selection box: |mar

Admin site error reporting

2019-10-22 Thread Dieter Gyselinck
When a change form is accessed in the admin site and an error occurs we receive an error screen if debug equals True. If I run into the same error on production, where debug equals False, I don't receive an error email. The error handling is probably configured correctly as I do get error em

Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread fils-aime walnes andre
Merci freo Le lundi 21 octobre 2019, adonis simo a écrit : > > # Generated by Django 2.2.3 on 2019-10-21 22:00 > > > > from django.db import migrations, models > > import django.db.models.deletion > > import django_extensions.db.fields > > > > > > class Migration(migrations.Migration): > > > >

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
okay! But I'm new to django and learn frim udemy. That's why!. I will remember your advise. Thanks! On Tue, 22 Oct 2019, 5:44 pm laya Mahmoudi Ok good, > But I say another time. You don't need to write model for user. Your code > needs to be better. > > در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۴۱ P

Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
Ok good, But I say another time. You don't need to write model for user. Your code needs to be better. در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۴۱ Parvez Khan Pathan < iamparvezkha...@gmail.com> نوشت: > thanks for response sir... > > Problem solved... It was silly mistake... > I put extra space in '__

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
thanks for response sir... Problem solved... It was silly mistake... I put extra space in '__all__' See which i post image its clearly seen extra space over there in meta class... On Tue, 22 Oct 2019, 5:31 pm laya Mahmoudi At first, you don't need to write a model for user whith this fields. >

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
*Problem Solved : that was silly mistyake* i just put extra space in '__all__' its solved!!! thanks to you alll for response and help On Tuesday, 22 October 2019 16:44:37 UTC+5:30, Parvez Khan Pathan wrote: > > [image: pyissue1.png] > Sir Already Added! still got error!!! > > On Tuesday, 22 O

Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
At first, you don't need to write a model for user whith this fields. Because django user has all this fields. After that please write some fields for meta like first_name, email.password etc در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۵:۲۱ Parvez Khan Pathan < iamparvezkha...@gmail.com> نوشت: > pls open t

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
pls open this link : https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread On Tue, 22 Oct 2019, 5:09 pm laya Mahmoudi Now what is the error?? > > در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan < > iamparvezkha...@gmail.com> نوشت: > >> [image: pyissue1.png]

Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
Now what is the error?? در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۴۵ Parvez Khan Pathan < iamparvezkha...@gmail.com> نوشت: > [image: pyissue1.png] > Sir Already Added! still got error!!! > > On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote: >> >> Hi, >> In your form.py , put fields:"_

Re: Can anyone sove my issue please!

2019-10-22 Thread Sundararajan Seshadri
Have a look at the stackoverflow page. Does the problem still remain? On Tuesday, October 22, 2019 at 4:32:29 PM UTC+5:30, Parvez Khan Pathan wrote: > > > https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread > -- You received this message because you are subscribe

Re: Can anyone sove my issue please!

2019-10-22 Thread Anirudh Jain
What is the error? On Tue, 22 Oct 2019, 16:49 Parvez Khan Pathan, wrote: > [image: pyissue2.png] > *Even check out my views.py file* > > On Tuesday, 22 October 2019 16:44:37 UTC+5:30, Parvez Khan Pathan wrote: >> >> [image: pyissue1.png] >> Sir Already Added! still got error!!! >> >> On Tues

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
[image: pyissue2.png] *Even check out my views.py file* On Tuesday, 22 October 2019 16:44:37 UTC+5:30, Parvez Khan Pathan wrote: > > [image: pyissue1.png] > Sir Already Added! still got error!!! > > On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote: >> >> Hi, >> In your form

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
[image: pyissue1.png] Sir Already Added! still got error!!! On Tuesday, 22 October 2019 16:38:34 UTC+5:30, laya Mahmoudi wrote: > > Hi, > In your form.py , put fields:"__all__" > > در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan < > iamparv...@gmail.com > نوشت: > >> >> https://stackove

Re: Can anyone sove my issue please!

2019-10-22 Thread laya Mahmoudi
Hi, In your form.py , put fields:"__all__" در تاریخ سه‌شنبه ۲۲ اکتبر ۲۰۱۹،‏ ۱۴:۳۳ Parvez Khan Pathan < iamparvezkha...@gmail.com> نوشت: > > https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread > > -- > You received this message because you are subscribed to the Googl

Re: Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
Creating forms from models issue! On Tuesday, 22 October 2019 16:32:29 UTC+5:30, Parvez Khan Pathan wrote: > > > https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread > -- You received this message because you are subscribed to the Google Groups "Django users" grou

Can anyone sove my issue please!

2019-10-22 Thread Parvez Khan Pathan
https://stackoverflow.com/questions/58502732/exception-in-thred-django-main-thread -- 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...@googl