Re: unable to import django packages

2019-06-19 Thread Lutalo Bbosa joseph
i think its more of a vscode issue probably some django paackages need to be activated in pylint On Wed, Jun 19, 2019 at 5:08 AM Aldian Fazrihady wrote: > Has the IDE used the same python environment with the one having Django > module installed? > > Aldian Fazrihady > > > On Wed, 19 Jun 2019,

Re: How to store a bank account number generated into a model field

2019-06-19 Thread 'Ying Yu' via Django users
You could try the CharField to store the account number. Also, it is better to store the balance as FloatField -- 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: ManyToMany no Model

2019-06-19 Thread Sipum Mishra
Ggt yano jika teme sulo faso tadan siku. Lhggg On Wed, 19 Jun, 2019, 5:55 PM Christian Oliveira, < christianoliveir...@gmail.com> wrote: > Bom dia, como posso fazer para acessar os dados de uma tabela derivada de > um ManyToMany?? > > -- > You received this message because you are subscribed to

API Root doesn't have has_permissions with JWT_Authentication

2019-06-19 Thread Yoo
https://stackoverflow.com/questions/56673987/api-root-doesnt-have-has-permissions-with-jwt-authentication Someone please help. I have a feeling that because of this error, in production, there'll be a security flaw because of this attribute error... -- You received this message because you are

How to store a bank account number generated into a model field

2019-06-19 Thread Dennis Alabi
I tried but i don't seem to be getting it, please help Views.py from django.contrib import messages from django.contrib.auth.decorators import login_required from django.http import Http404 from django.shortcuts import render, redirect from .forms import DepositForm, WithdrawalForm from

Re: How to access manytomany field content

2019-06-19 Thread Андрей Сердюк
So You should to show Your template first and use ModelForm to inherit it with model You need in meta options. -- 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: How to access manytomany field content

2019-06-19 Thread Alagiri Rajesh
Hi @Андрей Сердюк, Thank you for quick response. Some clarifications please? So you are saying that i need to create a new class for the category? the current code for one of my app where i am using category field is as below: class Listing(models.Model): > user=

How to access manytomany field content

2019-06-19 Thread Андрей Сердюк
Hi, if Your code looks like this: class Category(models.Model): name = models.CharField(maxlength=32) pass class Goods(models.Model): categories = models.ManyToManyField(Category, on_delete=models.CASCADE) You would get it with this code: category = Category.objects.get(pk=23) goods

[HELP] My applications objects are not related

2019-06-19 Thread Julien Mongault
Hello, I start by saying that english is not my main language and I am sorry if I made mistakes. I have an old app in Django 1.2 and I need to update it to Django 2.2. I have made a lot of change to be hable to run the application in Django 2.2 but I have an issue.. In my project there is 2

Re: IndexError: Number of args exceeds number of fields

2019-06-19 Thread Ezequias Rocha
I got the answare Simon. Thank you so much for your attention. I did a mistake on my MyClassAdmin definition. Best regards Ezequias On Wednesday, June 19, 2019 at 10:50:47 AM UTC-3, Simon Charette wrote: > > It's hard to tell without the full traceback but Django 1.11 doesn't > support Python

Re: Vicious cycle: Cannot migrate a DB that uses a widget using a model

2019-06-19 Thread Simon Charette
Hello Victor, You should avoid performing database queries at module loading level as the code will necessary crash if the database is missing or unmigrated. I suggest you lazily define widgets instead by using a cached property[0] class PlaceWidget(widgets.MultiWidget): def __init__(self,

Re: IndexError: Number of args exceeds number of fields

2019-06-19 Thread Simon Charette
It's hard to tell without the full traceback but Django 1.11 doesn't support Python 3.7 so it'd start by either using Django 2.2 or downgrading to Python 3.6 Cheers, Simon Le mercredi 19 juin 2019 08:16:51 UTC-4, Ezequias Rocha a écrit : > > Hi everyone > > I am doing a modeling of my database

Vicious cycle: Cannot migrate a DB that uses a widget using a model

2019-06-19 Thread Victor Porton
When I try to migrate my project from empty DB state, it falls into a vicious cycle: Trying to migrate it requests Country.objects.all() because it has form fields using PlaceWidget but this requires it to be already migrated. How to solve this problem? class PlaceWidget(widgets.MultiWidget):

How to access manytomany field content

2019-06-19 Thread Alagiri Rajesh
Hi I am using the "Django Category" app (https://github.com/praekelt/django-category) I have installed the same and also have implemented the same. How do i access the category title and other details. Have tried to use the documentation but using

ManyToMany no Model

2019-06-19 Thread Christian Oliveira
Bom dia, como posso fazer para acessar os dados de uma tabela derivada de um ManyToMany?? -- 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

IndexError: Number of args exceeds number of fields

2019-06-19 Thread Ezequias Rocha
Hi everyone I am doing a modeling of my database on DJANGO and after almost 10 tables I did another model configuration and after making my *admin.site.register(baseclass, basecalassAdmin)* I got the following error message: *IndexError: Number of args exceeds number of fields* Could anyone

Help with Address app https://github.com/furious-luke/django-address

2019-06-19 Thread Alagiri Rajesh
Hi I am trying to link the address app . When i follow the instruction on the doc it says to just add as below from address.models import AddressField > > class MyModel(models.Model): > address1 = AddressField() > address2 =