Re: AttributeError: module 'polls.views' has no attribute 'index' error in Django

2024-12-07 Thread Олександр Рябов
Guys, thanks for the help everyone but I just used vim and rewrote the code again) On Thursday, 5 December 2024 at 15:02:36 UTC+3 Олександр Рябов wrote: > Hello! I'm facing an issue when running my Django project. I get the > following error: > > AttributeError: module &#x

Re: AttributeError: module 'polls.views' has no attribute 'index' error in Django

2024-12-06 Thread Abduljelil Zubairu
is your VS Code on auto save On Thursday, December 5, 2024 at 1:02:36 PM UTC+1 Олександр Рябов wrote: > Hello! I'm facing an issue when running my Django project. I get the > following error: > > AttributeError: module 'polls.views' has no attribute 'index

Re: AttributeError at /auth/users/

2023-07-02 Thread s.alaoui youssef
mail: > raise ValueError('Email address required') > > email = self.normalize_email(email) > user = self.model(email=email, name=name) > user.set_password(password) > user.save() > return user > > AttributeError at

Re: AttributeError at /auth/users/

2023-07-02 Thread s.alaoui youssef
email = self.normalize_email(email) >> user = self.model(email=email, name=name) >> user.set_password(password) >> user.save() >> return user >> >> AttributeError at /auth/users/'Manager' object has no attribute >> &#

Re: AttributeError at /auth/users/

2023-07-01 Thread Muhammad Juwaini Abdul Rahman
elf.normalize_email(email) > user = self.model(email=email, name=name) > user.set_password(password) > user.save() > return user > > AttributeError at /auth/users/'Manager' object has no attribute > 'create_user' > Request

Re: AttributeError at /auth/users/

2023-07-01 Thread Fikayo Soetan
ValueError('Email address required') > > email = self.normalize_email(email) > user = self.model(email=email, name=name) > user.set_password(password) > user.save() > return user > > AttributeError at /auth/users/'Man

AttributeError at /auth/users/

2023-07-01 Thread arun n
, password=None): if not email: raise ValueError('Email address required') email = self.normalize_email(email) user = self.model(email=email, name=name) user.set_password(password) user.save() return user AttributeError at /

Re: python manage.py commonds: AttributeError: 'PosixPath' object has no attribute 'startswith'

2023-05-14 Thread David Du
rgs) >>> File >>> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line >>> 3272, in _initialize_master_working_set >>> working_set = WorkingSet._build_master() >>> File >>> "

Re: python manage.py commonds: AttributeError: 'PosixPath' object has no attribute 'startswith'

2023-04-26 Thread Julius Chesoni
, line >> 572, in _build_master >> ws = cls() >> File >> "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line >> 565, in __init__ >> self.add_entry(entry) >> File >> "/opt/.pyvenv/lib/python3.10/sit

Re: python manage.py commonds: AttributeError: 'PosixPath' object has no attribute 'startswith'

2023-04-25 Thread David Nugent
es/__init__.py", line > 565, in __init__ > self.add_entry(entry) > File > "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line > 621, in add_entry > for dist in find_distributions(entry, True): > File > "/opt/.pyv

python manage.py commonds: AttributeError: 'PosixPath' object has no attribute 'startswith'

2023-04-23 Thread DL
nv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 621, in add_entry for dist in find_distributions(entry, True): File "/opt/.pyvenv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1988, in find_distributions importer = get_importer(path_item) Fi

Re: AttributeError: 'QuerySet' object has no attribute 'mime_type'

2023-01-19 Thread Jason
ation\automation\user\views.py", line > 140, in post > message = Mail( > ^ > File > "C:\Users\Lenovo\marketautomation\venv\Lib\site-packages\sendgrid\helpers\mail\mail.py", > > line 80, in __init__ > self.add_content(html_content, MimeTy

AttributeError: 'QuerySet' object has no attribute 'mime_type'

2023-01-19 Thread Monisha Sivanathan
te-packages\sendgrid\helpers\mail\mail.py", line 80, in __init__ self.add_content(html_content, MimeType.html) File "C:\Users\Lenovo\marketautomation\venv\Lib\site-packages\sendgrid\helpers\mail\mail.py", line 734, in add_content if content.mime_type == MimeType.tex

Re: AttributeError at /form/

2022-12-18 Thread 'Kasper Laudrup' via Django users
Reading something like this: https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd should help guide you in the right direction. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

AttributeError at /form/

2022-12-17 Thread Aravind
AttributeError at /form/'AssetForm' object has no attribute 'save' Request Method: POST Request URL: http://127.0.0.1:8000/form/ Django Version: 4.1.2 Exception Type: AttributeError Exception Value: 'AssetForm' object has no attribute 'save' Exception Locati

Re: AttributeError: module 'django.db.models' has no attribute 'PointField'

2022-11-27 Thread Larry Martell
On Sun, Nov 27, 2022 at 2:40 PM Ilyas Modni wrote: > > AttributeError: module 'django.db.models' has no attribute 'PointField' Are you importing: from django.contrib.gis.db import models -- You received this message because you are subscribed to the Google Groups

Re: AttributeError: module 'django.db.models' has no attribute 'PointField'

2022-11-27 Thread Karen Tracey
On Sun, Nov 27, 2022 at 2:41 PM Ilyas Modni wrote: > AttributeError: module 'django.db.models' has no attribute 'PointField' > > PointField is in django.contrib.gis.db.models: https://docs.djangoproject.com/en/4.1/ref/contrib/gis/model-api/#pointfield -- You rece

AttributeError: module 'django.db.models' has no attribute 'PointField'

2022-11-27 Thread Ilyas Modni
AttributeError: module 'django.db.models' has no attribute 'PointField' -- 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 e

psycopg 3 - getting attributeError

2022-11-04 Thread Brian Nabusiu
[image: attribute_error.png]Hello, I wanted to migrate my app to using psycopg 3. However, I got an error that insists using psycopg2, even when it was not installed in venv. So I decided to ammend some django code as illustrated by the inventor of psycopg3. However, 1. django complained

AttributeError at /invoice/add_invoice/ 'int' object has no attribute '_meta' while using in_bulk

2022-07-10 Thread Kiran Chavan
I want to convert the model instances into a JSON object and then pass it to the HTML file. However, I get an AttributeError at this line: `data = serializers.serialize("json", Inventory.objects.in_bulk())` The full `views.py`: def add_invoice(request): form = InvoiceForm(re

Re: AttributeError at /api/courses/

2021-12-22 Thread Kasper Laudrup
If you want someone to help you then spend the minimum effort and ask a proper question. That's the least you can do if you expect someone to take the time to help you. Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "Django users"

Re: AttributeError: 'Values' object has no attribute 'link_base' in building sphinx documentation.

2021-12-10 Thread Sencer Hamarat
ed. > > On Thursday, December 9, 2021 at 10:15:03 AM UTC-5 sencer...@gmail.com > wrote: > >> Hello everyone, >> >> If 'sphinx.ext.autodoc' extension enabled in conf.py of sphinx, when I >> try to run 'make html' I'm ending up with Attribute

Re: AttributeError: 'Values' object has no attribute 'link_base' in building sphinx documentation.

2021-12-09 Thread Jason
conf.py of sphinx, when I try > to run 'make html' I'm ending up with AttributeError exception: > > Exception occurred: > File > /env/lib/python3.6/site-packages/django/contrib/admindocs/utils.py", line > 121, in _role > inliner.document.settings.link_

AttributeError: 'Values' object has no attribute 'link_base' in building sphinx documentation.

2021-12-09 Thread Sencer Hamarat
Hello everyone, If 'sphinx.ext.autodoc' extension enabled in conf.py of sphinx, when I try to run 'make html' I'm ending up with AttributeError exception: Exception occurred: File /env/lib/python3.6/site-packages/django/contrib/admindocs/util

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-07-26 Thread DJANGO DEVELOPER
.9.2 and >> Django 3.2 and have exactly the same problems as mentioned above. >> >> path('', views.index, name='index'), >> >> AttributeError: module 'polls.views' has no attribute 'index' >> >> any help on

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-07-26 Thread Zain
hon 3.9.2 and > Django 3.2 and have exactly the same problems as mentioned above. > > path('', views.index, name='index'), > > AttributeError: module 'polls.views' has no attribute 'index' > > any help on how can I debug this? I am

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-04-22 Thread David Nugent
On Mon, Apr 19, 2021 at 2:07 AM Avi Mehenwal wrote: > I followed the same tutorial on 17th April 2021 with Python 3.9.2 and > Django 3.2 and have exactly the same problems as mentioned above. > > path('', views.index, name='index'), > AttributeError: mo

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-04-18 Thread Avi Mehenwal
I followed the same tutorial on 17th April 2021 with Python 3.9.2 and Django 3.2 and have exactly the same problems as mentioned above. path('', views.index, name='index'), AttributeError: module 'polls.views' has no attribute 'index' any help on

Django 3.2 AttributeError: 'TextField' object has no attribute 'db_collation'

2021-04-07 Thread Asaduzzaman Sohel
I've an existing project on Django 3.1 and I upgraded my project to Django 3.2. I created an app called payment on my project. But When I make migrations. It trow an error ```AttributeError: 'TextField' object has no attribute 'db_collation'``` ``` from django.db impor

Re: AttributeError: 'customer' object has no attribute 'is_authenticated'

2021-04-01 Thread Gabriel Araya Garcia
; > On Thu, 1 Apr 2021, 22:32 Salima Begum, > wrote: > >> Hi all, >> >> How to solve this errors >> ``` >> AttributeError: 'customer' object has no attribute 'is_authenticated' >> ``` >> >> ``` >> AttributeError: '

Re: AttributeError: 'customer' object has no attribute 'is_authenticated'

2021-04-01 Thread sebasti...@gmail.com
I think this must be wrong. Only User instance have a method is_authenticated. Here a example for views: if request.user.is_authenticated: pass sali...@rohteksolutions.com schrieb am Donnerstag, 1. April 2021 um 19:03:36 UTC+2: > Hi all, > > How to solve this errors > ``` >

Re: AttributeError: 'customer' object has no attribute 'is_authenticated'

2021-04-01 Thread Mahendra
I think given name is wrong Hlo do you have any idea posting form data? Mahendra Yadav On Thu, 1 Apr 2021, 22:32 Salima Begum, wrote: > Hi all, > > How to solve this errors > ``` > AttributeError: 'customer' object has no attribute 'is_authenticated' > ```

AttributeError: 'customer' object has no attribute 'is_authenticated'

2021-04-01 Thread Salima Begum
Hi all, How to solve this errors ``` AttributeError: 'customer' object has no attribute 'is_authenticated' ``` ``` AttributeError: 'customer' object has no attribute 'is_anonymous' ``` How can I solve this above errors. Help me. Thanks ~Salima -- Y

Re: AttributeError: 'NoneType' object has no attribute 'replace'

2021-02-23 Thread Kasper Laudrup
On 23/02/2021 17.56, Abnilson Rafael wrote: Hi, I'm getting error above when I try to this program: The get_language() member function/method of your "translation" object/variable doesn't return anything and you most likely expect it to return a string. Try to figure out how that could happ

Re: AttributeError: type object 'User' has no attribute 'objects'

2021-02-22 Thread georgia...@gmail.com
Sorry I have the same similar problem, please help, thank you!! I put the question on stackoverflow, there are questions and reference materials attached. So you can click the link to enter : https://stackoverflow.com/questions/66310704/attributeerror-type-object-product-has-no-attribute

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-15 Thread Mislav Jurić
(self): >>>>>> return str(self.first_name) + str(self.last_name) >>>>>> >>>>>> *Why do I need the foreign key to User in the first place?* I don't >>>>>> recall seing the foreign key to User in any one of the tutorials. >

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-14 Thread coolguy
all seing the foreign key to User in any one of the tutorials. >>>>> Dana subota, 12. rujna 2020. u 20:20:11 UTC+2 korisnik coolguy napisao >>>>> je: >>>>> >>>>>> Please share the complete employee model. It seems you are missing >>&g

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-14 Thread Mislav Jurić
2020. u 20:20:11 UTC+2 korisnik coolguy napisao >>>> je: >>>> >>>>> Please share the complete employee model. It seems you are missing >>>>> User foreign key in it. >>>>> >>>>> On Saturday, September 12, 2020 at 2:03:

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-13 Thread coolguy
UTC-4 >>>> mislav@gmail.com wrote: >>>> >>>>> Hey guys, >>>>> >>>>> I have the following code in models.py file in one of my apps: >>>>> >>>>> def get_upload_path(instance, filename): >>>>&

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-13 Thread coolguy
turday, September 12, 2020 at 2:03:20 PM UTC-4 >>>> mislav@gmail.com wrote: >>>> >>>>> Hey guys, >>>>> >>>>> I have the following code in models.py file in one of my apps: >>>>> >>>>> def get_upload_path(instance,

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-13 Thread Mislav Jurić
] >>>> return "employees/media/users/{0}/profile_picture.{1}".format( >>>> instance.user.id, extension) >>>> >>>> class Employee(models.Model): >>>> # some attributes here >>>> profile_picture = models.ImageFie

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-12 Thread coolguy
>>> >>> class Employee(models.Model): >>> # some attributes here >>> profile_picture = models.ImageField(upload_to=get_upload_path, >>> blank=True, null=True) >>> >>> I am getting the following error when I try to add

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-12 Thread Mislav Jurić
, >> blank=True, null=True) >> >> I am getting the following error when I try to add an Employee via the >> admin interface: >> >> AttributeError at /admin/employees/employee/add/ >> >> 'Employee' object has no attribute 'user' >

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-12 Thread coolguy
ield(upload_to=get_upload_path, > blank=True, null=True) > > I am getting the following error when I try to add an Employee via the > admin interface: > > AttributeError at /admin/employees/employee/add/ > > 'Employee' object has no attribute 'user' &

AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-12 Thread Mislav Jurić
s.Model): # some attributes here profile_picture = models.ImageField(upload_to=get_upload_path, blank=True, null=True) I am getting the following error when I try to add an Employee via the admin interface: AttributeError at /admin/employees/employee/add/ 'Employee' object has no a

Re: AttributeError when returning post.title in a comment model

2020-05-31 Thread Julio Cojom
Try '{0}-{1}'.format(var1, var2) Check in the console in what line it's throwing the attribute error Rewards El vie., 29 de mayo de 2020 5:10 p. m., Ahmed Khairy < ahmed.heshamel...@gmail.com> escribió: > I was working on a comment section for post and was getting an

Re: Possible Bug? AttributeError: 'HttpResponse' object has no attribute '_resource_closers'

2020-05-30 Thread Tim Allen
but people using Gunicorn have seen the issue too. Here's >> a link to the question on Stack Overflow: >> >> >> https://stackoverflow.com/questions/61295971/django-3-0-5-with-mod-wsgi-attributeerror-httpresponse-object-has-no-attribu >> >> Unfortunately, pur

AttributeError when returning post.title in a comment model

2020-05-29 Thread Ahmed Khairy
I was working on a comment section for post and was getting an AttributeError when I return return '{}-{}'.format(self.post.title, str(self.user.username)) in the comment model I am trying to link users and posts to the comment I am getting the same error Here is the Models

Re: " AttributeError at /register/ " facing problem in implementing user registration

2020-05-24 Thread Kasper Laudrup
Hi Madhav, On 24/05/2020 13.08, Madhav Nandan wrote: I'm creating a register page. see the screenshot below., I'm following lectures and doing as instructed but still stuck. I don't see how the screenshots are related to the issue you are having. Please explain. here is the source code

Re: " AttributeError at /register/ " facing problem in implementing user registration

2020-05-24 Thread Kasper Laudrup
Hi Madhav, On 24/05/2020 04.54, Madhav Nandan wrote: Hi, I need help here. I did the required changes in forms.py as well as in view.py but my user registration still not working. Once again, try to make sense from the error messages. They are actually pointing to your problem quite clearl

Re: Possible Bug? AttributeError: 'HttpResponse' object has no attribute '_resource_closers'

2020-05-16 Thread Jorge Gimeno
.com/questions/61295971/django-3-0-5-with-mod-wsgi-attributeerror-httpresponse-object-has-no-attribu > > Unfortunately, purging my cache hasn't fixed the problem like it did for a > commenter on the question, so I'm asking here for amplification. Here's the > text of the p

Possible Bug? AttributeError: 'HttpResponse' object has no attribute '_resource_closers'

2020-05-16 Thread Tim Allen
I posted this to Stack Overflow first, thinking it might be a problem with `mod_wsgi`, but people using Gunicorn have seen the issue too. Here's a link to the question on Stack Overflow: https://stackoverflow.com/questions/61295971/django-3-0-5-with-mod-wsgi-attributeerror-httpresponse-o

Re: AttributeError

2020-04-27 Thread 'Amitesh Sahay' via Django users
27;)  date=forms.DateField(required=False)   t = SearchProduct() print(t.date) Error: AttributeError: 'SearchProduct' object has no attribute 'date' why is there this error? How to fix it? ff -- You received this message because you are subscribed to the Google Groups "

Re: AttributeError with forms

2020-04-27 Thread 'Amitesh Sahay' via Django users
I couldn't open the screenshot . But to work with the django forms you need to perform below tasks. 1) create model of your choice in models.py.2).  Python manage.py makemigrations3) python manage py migrate.4 create a python file called forms.py inside your app.5) import your models there ( fro

Re: AttributeError with forms

2020-04-27 Thread Ethem Güner
It's not strange. You can't access to an attribute of a form class directly. Remember how do you define the form in a view. You're passing arguments such as *data=request.POST*. You're trying to access an undefined attribute. Because It's a form class and needs input. Try to print *t.__dict__ *yo

Re: AttributeError with forms

2020-04-27 Thread Phako Perez
In addition, you must define your model in models.py And to get this attributes on your views.py from a post request, you could use like {{ form.attribute }} Regards Sent from my iPhone > On 27 Apr 2020, at 10:29, DimGo wrote: > >  > Why is this this strange error? > -- > You received thi

Re: AttributeError

2020-04-27 Thread Phako Perez
ceptions import ValidationError > > class SearchProduct(forms.Form): > text=forms.CharField(label='Search ') > date=forms.DateField(required=False) > > t = SearchProduct() > print(t.date) > > Error: > > AttributeError: 'SearchProduct' object has n

AttributeError

2020-04-27 Thread DimGo
from django import forms from django.core.exceptions import ValidationError class SearchProduct(forms.Form): text=forms.CharField(label='Search ') date=forms.DateField(required=False) t = SearchProduct() print(t.date) Error: AttributeError: 'SearchProduct' object ha

Re: AttributeError: type object 'User' has no attribute 'objects'

2020-04-27 Thread sagar ninave
i got answer i was doing this: from .models import User user = User.objects.filter(pk=user_id) instead i do this: from .models import MyUser user = MyUser.objects.filter(pk=user_id) error gone On Mon, Apr 27, 2020 at 6:57 AM Kasper Laudrup wrote: > Hi Sagar, > > On 27/04/2020 14.25, saga

Re: AttributeError: type object 'User' has no attribute 'objects'

2020-04-27 Thread Kasper Laudrup
Hi Sagar, On 27/04/2020 14.25, sagar ninave wrote: i am getting this error It's hard to guess since you don't show where your User class comes from, but it doesn't seem like its inheriting from the Django model class. The error message is quite clear. Look at your User model. Btw. just a hi

Error in formatting: AttributeError: 'UUID' object has no attribute 'int'

2020-04-03 Thread aetar
UUID string') … ▼ Local vars <http://127.0.0.1:8000/posts/2/#> VariableValue bytes None bytes_le None fields None hex '2' int None is_safe self Error in formatt

Re: AttributeError: 'NoneType' object has no attribute 'app_name'

2020-03-13 Thread Sencer Hamarat
template context_processor. >> And when unavailable URL request arrives to Django (Eg. "/wp-login.php"), >> the context_processor is throwing AttributeError. >> >> Which way should I use to prevent from context processor from throwing >> errors? >

Re: AttributeError: 'NoneType' object has no attribute 'app_name'

2020-03-03 Thread Naveen Arora
s it's custom template context_processor. > And when unavailable URL request arrives to Django (Eg. "/wp-login.php"), > the context_processor is throwing AttributeError. > > Which way should I use to prevent from context processor from throwing > errors? > Is it o

AttributeError: 'NoneType' object has no attribute 'app_name'

2020-03-02 Thread Sencer Hamarat
Hello, The project I'm working on has it's custom template context_processor. And when unavailable URL request arrives to Django (Eg. "/wp-login.php"), the context_processor is throwing AttributeError. Which way should I use to prevent from context processor from throwing

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: 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: AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-21 Thread Jorge Gimeno
set(_error_files)) > File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line > 124, in iter_modules_and_files > if getattr(module, '__spec__', None) is None: > SystemError: returned a result with an error > set > > > > On Sund

Re: AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-20 Thread 'Abhishek Sharma' via Django users
a result with an error set On Sunday, October 20, 2019 at 8:27:48 PM UTC+5:30, Abhishek Sharma wrote: > > I'm using Django and while run code getting below error, please help out > on it > > AttributeError: cffi library '_constant_time' has no function, constant or > global

AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__'

2019-10-20 Thread 'Abhishek Sharma' via Django users
I'm using Django and while run code getting below error, please help out on it AttributeError: cffi library '_constant_time' has no function, constant or global variable named '__spec__' -- The information in this e-mail and any attachments is confid

Re: AttributeError

2019-10-02 Thread Daniel Hepper
Hi , >> >> While try to execute it showing AttributeError, Can some one help me on >> this. >> >> >> My views.py >> >> >> >> from django.shortcuts import render >> from django.http import Http404 &

Re: AttributeError

2019-10-01 Thread Jorge Gimeno
On Tue, Oct 1, 2019 at 9:24 PM yasar arafath Kajamydeen wrote: > Hi , > > While try to execute it showing AttributeError, Can some one help me on > this. > > > *My views.py* > > > > from django.shortcuts import render > from django.http import Http404 &g

AttributeError

2019-10-01 Thread yasar arafath Kajamydeen
Hi , While try to execute it showing AttributeError, Can some one help me on this. *My views.py* from django.shortcuts import render from django.http import Http404 from django.http import HttpResponse from .models import Question def index(request): latest_question_list

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-07 Thread Kean
Hi, removing did, not work, still getting same error. Welcome any other help from the wider community in reference to this issue. best, Kean On 6 Sep 2019, at 22:26, Bhoopesh sisoudiya wrote: > Try after removing related_name='expenses' from Expenses model. > > On Sat, Sep 7, 2019, 2:28 AM Ke

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
Ok, Updated to below, and am still getting the same error: def projectdetail(request): projectList = Project.objects.all() projectExpenseDetails = Expense.objects.select_related('project').all() return render(request, 'busprojectdetail.html', {'project': project, 'expense_list': proj

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
Hi Ok, I updated as advised. views.py def projectdetail(request): projectExpenseDetails = Expense.objects.select_related('project').all() return render(request, 'busprojectdetail.html', {'project': project, 'expense_list': projectExpenseDetails}) I get new error Exception Type: NameErr

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Bhoopesh sisoudiya
ot Manager >>>>> Please make Manager Class. >>>>> >>>>> >>>>> Thanks >>>>> Bhoopesh sisoudiya >>>>> >>>>> On Sat, Sep 7, 2019, 12:20 AM Kean wrote: >>>>> >>>>>>

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
gt;> path('businesslogin/businessadmin/busproject', views.projectdetail, >>>> name='projectdetail'), >>>> >>>> views.py >>>> >>>> def projectdetail(request): >>>> project = Project.objects.al

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Bhoopesh sisoudiya
27;projectdetail'), >>>>> >>>>> views.py >>>>> >>>>> def projectdetail(request): >>>>> project = Project.objects.all() >>>>> return render(request, 'busprojectdetail.html', {'project

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
jectdetail.html', {'project': project, >>> 'expense_list': project.expenses.all()}) >>> >>> models.py >>> >>> # Project model >>> >>> class Project(models.Model): >>> name = models.CharField(max_

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Bhoopesh sisoudiya
27;: project.expenses.all()}) >>>> >>>> models.py >>>> >>>> # Project model >>>> >>>> class Project(models.Model): >>>> name = models.CharField(max_length=100) >>>> budget = IntegerField() >

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
gerField() >> >> def save(self, *args, **kwargs): >> self.name >> super(Project, self).save(*args, **kwargs) >> >> # Category manager model >> >> >> class Category(models.Model): >> project = models.ForeignKey( >>

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Bhoopesh sisoudiya
;>> def save(self, *args, **kwargs): >>>> self.name >>>> super(Project, self).save(*args, **kwargs) >>>> >>>> # Category manager model >>>> >>>> >>>> class Category(models.Model): &g

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Bhoopesh sisoudiya
gt;>> class Category(models.Model): >>> project = models.ForeignKey( >>> Project, on_delete=models.CASCADE) >>> name = models.CharField(max_length=150) >>> >>> >>> # Expenses manager model >>> >>> class Expense(

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
t; > > # Expenses manager model > > class Expense(models.Model): > project = models.ForeignKey( > Project, on_delete=models.CASCADE, related_name='expenses') > title = models.CharField(max_length=100) > amount = models.DecimalField(max_dig

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Bhoopesh sisoudiya
s manager model >> >> class Expense(models.Model): >> project = models.ForeignKey( >> Project, on_delete=models.CASCADE, related_name='expenses') >> title = models.CharField(max_length=100) >> amount = models.DecimalField(max_digits=8,

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
gt; > > # Expenses manager model > > class Expense(models.Model): > project = models.ForeignKey( > Project, on_delete=models.CASCADE, related_name='expenses') > title = models.CharField(max_length=100) > amount = models.DecimalField(max_digits

Re: AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Bhoopesh sisoudiya
manager model > > class Expense(models.Model): > project = models.ForeignKey( > Project, on_delete=models.CASCADE, related_name='expenses') > title = models.CharField(max_length=100) > amount = models.DecimalField(max_digits=8, decimal_places=2) > cat

AttributeError 'QuerySet' object has no attribute 'expenses'

2019-09-06 Thread Kean
: project = models.ForeignKey( Project, on_delete=models.CASCADE, related_name='expenses') title = models.CharField(max_length=100) amount = models.DecimalField(max_digits=8, decimal_places=2) category = models.ForeignKey(Category, on_delete=models.CASCADE) the err

Re: AttributeError 'QuerySet' object has no attribute '_meta'

2019-08-18 Thread Kean Dumba
Ok thanks is there a way to call all objects, as this is more user friendly and efficient when potentially editing many object fields? On Sun, 18 Aug 2019 at 18:05, Daniel Roseman wrote: > You can't pass *all* the objects to the form. You have to get the specific > one you want to edit and pass

AttributeError 'QuerySet' object has no attribute '_meta'

2019-08-18 Thread Daniel Roseman
You can't pass *all* the objects to the form. You have to get the specific one you want to edit and pass that as the instance. -- 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

AttributeError 'QuerySet' object has no attribute '_meta'

2019-08-18 Thread Kean
Hi, New to Django but trying to stick with it. I have created a model form, which creates ok. I am trying to edit records. I have the following, but keep getting the QuerySet object has no attribute '_meta' in the browser. my views.py def editbusiness(request): data = models.Businessownercrea

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-08 Thread Andrew Godwin
The bug was only on Python 3.5. It's possible the other system was 3.6 or 3.7? Andrew On Sun, Jul 7, 2019 at 9:48 AM Rohit Chopra wrote: > Hi Andrew, > > Just a small doubt, why same code is working on my local system. > Both local and server have same version of requirements mentioned in > re

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Rohit Chopra
Hi Andrew, Just a small doubt, why same code is working on my local system. Both local and server have same version of requirements mentioned in requirements.txt Rohit On Sun 7 Jul, 2019, 9:36 PM Andrew Godwin, wrote: > Hi Rohit, > > This is my fault - we made a change in the "asgiref" librar

Re: Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Andrew Godwin
Hi Rohit, This is my fault - we made a change in the "asgiref" library that inadvertently removed Python 3.5 support. Channels still needs to support it (even though Django doesn't). If you update to asgiref 3.1.4, which I've just released, that should fix the issue. Andrew On Sun, Jul 7, 2019

Getting AttributeError: module 'asyncio' has no attribute '_get_running_loop'

2019-07-07 Thread Rohit Chopra
Hi All, I am using channels to implement WebSockets. I am trying to send data through WebSockets from *post_save *django signal. Below is my code. **signals.py** @receiver(post_save, sender=CheckIn) def send_data_on_save(sender, instance, **kwargs): channel_layer = get_channel_layer() s

AttributeError: type object 'NHTTrainerInline' has no attribute '_meta'

2019-03-11 Thread raghav b
nlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\IBM_ADMIN\TrainingCentral\NHT\admin.py", line 38, in admin.site.register([NHTTrainer, NHTTrainerInline])

Re: Django 1.11: AttributeError: 'module' object has no attribute 'setup_environ'

2019-03-05 Thread Chi Shiek
ive_path) >> INFO 2019-02-28 19:01:49,720 module.py:861] default: "GET >> /Common?action=%5B%22logout%22%5D HTTP/1.1" 500 - >> File >> "/home/cshiek/Programs/google-cloud-sdk-1.9.83/platform/google_appengine/google/appengine/ext/django/main.py", &

Re: Django 1.11: AttributeError: 'module' object has no attribute 'setup_environ'

2019-02-28 Thread Chi Shiek
.1" 500 - > File > "/home/cshiek/Programs/google-cloud-sdk-1.9.83/platform/google_appengine/google/appengine/ext/django/main.py", > > line 82, in > management.setup_environ(settings, > original_settings_path=settings_path) > AttributeError: 'module&#

Re: Django 1.11: AttributeError: 'module' object has no attribute 'setup_environ'

2019-02-28 Thread Chi Shiek
> /Common?action=%5B%22logout%22%5D HTTP/1.1" 500 - > File > "/home/cshiek/Programs/google-cloud-sdk-1.9.83/platform/google_appengine/google/appengine/ext/django/main.py", > > line 82, in > management.setup_environ(settings, > original_settings_path=setting

  1   2   3   4   5   >