Related
Joey Coding I try to get the count of all attendees. I created the following for loopand query set. However, I always get the error message AttributeError: 'Q' object has no attribute 'count'. Do you have a solution? # Get count of attendees per ticket and the
Vandelay I am trying to append a simple string to a list in an and object. But I guess the self keyword interferes with the pyqt window? How can I fix this? class Window(qt.QMainWindow):
def __init__(self, parent=None):
super(Window, self).__init__
User 15440172 I'm working on the following/followers feature of the CS50w network. I stick to counting followers: Here is my model: class Following(models.Model):
"""Tracks the following of a user"""
user = models.ForeignKey(User, on_delete=models.CASC
јон.с I'm trying to convert a property computed in one class to another. And I'm stuck... In the "Reward" class, I need to subtract the "deductible" from the "pledge_level". In the "Pledge" class, I need to subtract "not_taxable" from "Amount" to return "decuc
Csci319 I am new to Python and I am writing this code below. fileName = input("Enter the file name: ")
InputFile = open(fileName, 'r')
text=InputFile.readable()
sentences = text.count('.') + text.count('?') + \
text.count(':') + text.count(';') +
Csci319 I am new to Python and I am writing this code below. fileName = input("Enter the file name: ")
InputFile = open(fileName, 'r')
text=InputFile.readable()
sentences = text.count('.') + text.count('?') + \
text.count(':') + text.count(';') +
Egg white protein I am using django 1.8 and having trouble. I am trying to import tinymce in my project. when i render it AttributeError: tuple 'object has no attribute 'regex' When I remove the url in url.py it is working. Here is my code. url.py from django.
Jerry Herro I'm trying to build a static site generator with Django (because that's resourceful), and now my problem is handling the Django commands that should build my static site content into a directory. Apparently my "NoneType" object has no attribute "sp
Milano I am trying to scale Userin Django . This new feature should have more properties Userthan the built-in properties, Userand some of them are required during the registration process . Also, I would like to see this new type of user Adminin . I have foll
Max Goodrich I'm trying to use a Django form to allow Django users to enter their three favorite interests. The error is displayed during template rendering {{form.as_ul}}. Here is the code: reg_interests.html {% block content %}
<br><br>
<h1>Choose the 3 thi
participate and learn I just finished writing my Heroes App model: Here is the models.py file for my hero app: Import models from django.db # Create your models here.
class Hero(models.Model):
codename = models.CharField(max_length = 30)
profilePic = m
user7304253 I've noticed that when I use the DRF document, I get an error, AttributeError: 'NoneType' object has no attribute 'method'and if there are self.request.method == 'POST'any ideas how to fix this, this is related to that line . views.py: @permission_
Skillset 12345 I am overriding the init method in the form and now it returns the error 'TransactionForm' object has no attribute '_errors' . I hope it will work because I have included super in init , but maybe I don't know how to use it properly. An explanat
Oyilmaztekin I am using django 1.8 and having trouble. I am trying to import tinymce in my project. when i render it AttributeError: tuple 'object has no attribute 'regex' When I remove the url in url.py it is working. Here is my code. url.py from django.conf.
Ian Bertrand I am trying to create my own blog using Django. I have a view to display articles extended from DetailView. To avoid any trouble, I'm trying to categorize articles based on their publication date. The URL of the article is like this (where pk corr
RvdBerg My django code is broken and throws the following AttributeError: AttributeError: 'GeoQuerySet' object has no attribute 'extent'
In my code I try to call extent on django geoqueryset: if raster and bbox:
self.extent = qs.extent()
My Djang
Afzal SH I have the following form; class RemoveMemberForm(Form):
member = forms.ModelChoiceField(queryset="",
empty_label='Choose a Member',
)
and the following views; class StationHome(View):
def get(self, reque
Martin Marcella Hi I'm trying to use django's annotations and I think I'm doing everything fine but I must be missing something because I'm getting an attribute error this is my model class Operation(models.Model):
...
class Message(models.Model):
ope
put up I am a beginner in Python and I am getting an error -AttributeError: 'str' object has no attribute 'objects' models.py has class feedback(models.Model):
prid=models.ForeignKey(addproduct,on_delete=models.CASCADE)
urid=models.ForeignKey(userreg,on_
Jewish I want to add a multiselect field to my project app. This field should allow the user to select multiple options. But I get an error. This part doesn't give any errors before adding the multiselect field. Where is my mistake? my views.py def project_new
Jerry Herro I'm trying to build a static site generator with Django (because that's resourceful), and now my problem is handling the Django commands that should build my static site content into a directory. Apparently my "NoneType" object has no attribute "sp
Eve 11 I am new to this and I want to change the selected data (food_status) and save it to the selected column (food_status column). but it shows an error For fields in self._meta.concrete_fields: AttributeError: 'NoneType' object has no attribute '_meta' in
Milano I am trying to scale Userin Django . This new feature should have more properties Userthan the built-in properties, Userand some of them are required during the registration process . Also, I would like to see this new type of user Adminin . I have foll
Samir Tenduka I have 2 model profiles and events. I want to save the number of events created by the user to the user profile so that even if the event is deleted the record remains in the user profile class Profile(models.Model):
user = models.OneToOneFie
Egg white protein I am using django 1.8 and having trouble. I am trying to import tinymce in my project. when i render it AttributeError: tuple 'object has no attribute 'regex' When I remove the url in url.py it is working. Here is my code. url.py from django.
Jerry Herro I'm trying to build a static site generator with Django (because that's resourceful), and now my problem is handling the Django commands that should build my static site content into a directory. Apparently my "NoneType" object has no attribute "sp
Omar Hussain I have 4 related models in an application: class AssetType(models.Model):
id = models.AutoField(primary_key=True)
type_name = CaseInsUniqueCharField(name='Type Name')
parent = models.ForeignKey('self', on_delete=models.CASCADE, blank=T
Jerry Herro I'm trying to build a static site generator with Django (because that's resourceful), and now my problem is handling the Django commands that should build my static site content into a directory. Apparently my "NoneType" object has no attribute "sp
Milano I am trying to scale Userin Django . This new feature should have more properties Userthan the built-in properties, Userand some of them are required during the registration process . Also, I would like to see this new type of user Adminin . I have foll