Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
2 answers
3k views

Using django-admin startproject trydjango gives error: AttributeError: module 'collections' has no attribute 'Iterator' even though I have Django installed and could see a list of commands by doing ...
0 votes
0 answers
56 views

I have a simple app that import csv file and make plot but without having any error message it doesn't show plot It's part of my module: ... def plot_data(self): df = pd.read_csv("file.csv&...
0 votes
1 answer
496 views

now = datetime.utcnow().replace(tzinfo=utc) .annotate( age=F(int((now - 'ended_at').total_seconds() / (60 * 60))) I want to add logic like above in Django query. basically i want to ...
0 votes
0 answers
426 views

when I do input data then I want to check the data key is valid or not by Django rest API JSON serialize field. I have a JSON serializer in serializers.py like as class EmployBasicInfoSerializers(...
0 votes
1 answer
547 views

Suppose I have three serializers in function and I want to check the validation. If any errors occur in the condition it Response error message at a time My function: def employ_create(request): ...
1 vote
1 answer
3k views

My code is: {% for key, value in section.items %} {% for key_t, value_t in title.items %} {% if value_t.section_id == key|add:"0" %} <li class="nav-...
0 votes
0 answers
1k views

When I Adds the specified model objects to the related object set. Like as My view.py: role = UserRole.objects.get(id=user_role_id) s = SbTitle.objects.filter(user_role=1) d = s.userrole_set.add(role) ...
0 votes
0 answers
125 views

I have a formset and I am trying to save it back. But, when I try to check if employ_academic_forms.is_valid() and save, validation always fails even if nothing in the formset has been changed. I am ...
0 votes
2 answers
3k views

setting.py from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent #TEMPLATES_DIR = path.join(BASE_DIR, '...
0 votes
1 answer
747 views

I'm trying to login by Facebook in my python projcet .it keeps telling me that ImportError: No module named 'oauth2_provider.ext' whenever I migrate it using terminal my installed using pip freeze : ...
0 votes
1 answer
46 views

How to update relation OneToOneField field in override save update working in object.create() but not working in .save() def save(self, *args, **kwargs): self.wallet.wallet_inventory = 50 ...
0 votes
0 answers
41 views

I am working on Python using the Django framework. During setting URLs for my web application, I am facing some problems. I have redirect code return HttpResponseRedirect('/{}-meters-to-{}/'.format(...
0 votes
1 answer
183 views

I am trying to get the events for any date that a user clicks on the calendar. When you click a date, say 8/15, the date is sent to the server as a string (yyyy-mm-dd) via ajax and updates a div on ...
0 votes
2 answers
2k views

I have this model: Department(models.Model): title = models.CharField(max_length=128) reference = models.ForeignKey('self', related_name='reference') As you see, each object of this model ...
1 vote
1 answer
1k views

Goal: Hi! How can I get the SMTP response codes through Django, similar to return values given from the smtplib module??? I want to use Django's api instead of having to use that, and I see nothing ...

15 30 50 per page
1
2 3 4 5
...
29

AltStyle によって変換されたページ (->オリジナル) /