Re: table bank_app_bank has no column named DOB

2023-08-25 Thread Steven maithya

(en) PS C:\Users\steve.musyoka\Desktop\CRM-master> python manage.py 
runserver
C:\Python311\python.exe: can't open file 
'C:\\Users\\steve.musyoka\\Desktop\\CRM-master\\manage.py': [Errno 2] No 
such file or directory
(en) PS C:\Users\steve.musyoka\Desktop\CRM-master> cd
(en) PS C:\Users\steve.musyoka\Desktop\CRM-master> ls






this is the error am getting when i run my django project any help please

On Thursday, August 24, 2023 at 10:25:23 AM UTC+3 meenu loranz wrote:

> from django.contrib import auth, messages
> from django.http import HttpResponse
> from django.shortcuts import render, redirect
>
> from bank_app.models import bank
>
> # Create your views here.
>
>
> def home(request):
> return render(request,"home.html")
>
> def login(request):
> if request.method == 'POST':
> username = request.POST['username']
> password = request.POST['password']
> user = auth.authenticate(username=username,password=password)
>
> if user is not None:
> auth.login(request,user)
> return redirect('/')
> else:
> messages.info(request,"invalid username or password")
> return redirect('login')
> return render(request,"login.html")
>
> def registration(request):
> return render(request,"registration.html")
>
> def add_form(request):
> if request.method == "POST":
> name = request.POST.get('name',)
> dob = request.POST.get('dob', )
> age = request.POST.get('age', )
> gender = request.POST.get('gender', )
> phone_no = request.POST.get('phone_no', )
> mail_id = request.POST.get('mail_id',)
> address = request.POST.get('address',)
> district = request.POST.get('district',)
> branch = request.POST.get('branch',)
> account_type = request.POST.get('account_type',)
>
> Bank = bank(name=name,dob=dob,age=age,gender=gender,phone_no=phone_no,
> mail_id=mail_id,address=address,district=district,
> branch=branch,account_type=account_type,)
>
> Bank.save()
> messages.info(request, 'Bank added successfully')
> return redirect('home')
> return render(request,'add.html')
>
> This is my views.py page. 
> On Tuesday, August 22, 2023 at 12:49:39 AM UTC+5:30 Mike Simkins wrote:
>
>> Did you regenerate and rerun the migrations ??
>>
>>
>> python manage.py makemigrations
>> python manage.py migrate
>>
>>
>>
>> On 21 Aug 2023, at 09:46, meenu loranz  wrote:
>>
>> Thank you for your response...i changed DOB to dob...but still showing me 
>> the error...
>> OperationalError at /add/ table bank_app_bank has no column named dob 
>> Request Method: 
>> POST 
>> Request URL: 
>> http://127.0.0.1:8000/add/ 
>> Django Version: 
>> 4.2 
>> Exception Type: 
>> OperationalError 
>> Exception Value: 
>> table bank_app_bank has no column named dob 
>> Exception Location: 
>> C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py,
>>  
>> line 328, in execute 
>> Raised during: 
>> bank_app.views.add_form 
>> Python Executable: 
>> C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe 
>> Python Version: 
>> 3.9.0 
>> Python Path: 
>> ['C:\\Users\\Admin\\myprojects\\banking_system\\bank_project', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip',
>>  
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
>>  
>>
>> Server time: 
>> Mon, 21 Aug 2023 08:44:34 +
>>
>> On Saturday, August 19, 2023 at 10:49:13 PM UTC+5:30 RANGA BHARATH JINKA 
>> wrote:
>>
>>> Hi,
>>>
>>> Try changing DOB to small letters dob and run the migrations again. 
>>>
>>> All the best 👍
>>>
>>> Thanks and Regards
>>>
>>> J. Ranga Bharath
>>> Cell: 9110334114
>>> 
>>>
>>> On Sat, 19 Aug 2023, 9:18 pm ivan harold,  wrote:
>>>
>>>>
>>>> https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column
>>>>
>>>> Try reading this article, it may help you.
>>>>
>>>> On Saturd

Re: table bank_app_bank has no column named DOB

2023-08-24 Thread meenu loranz
from django.contrib import auth, messages
from django.http import HttpResponse
from django.shortcuts import render, redirect

from bank_app.models import bank

# Create your views here.


def home(request):
return render(request,"home.html")

def login(request):
if request.method == 'POST':
username = request.POST['username']
password = request.POST['password']
user = auth.authenticate(username=username,password=password)

if user is not None:
auth.login(request,user)
return redirect('/')
else:
messages.info(request,"invalid username or password")
return redirect('login')
return render(request,"login.html")

def registration(request):
return render(request,"registration.html")

def add_form(request):
if request.method == "POST":
name = request.POST.get('name',)
dob = request.POST.get('dob', )
age = request.POST.get('age', )
gender = request.POST.get('gender', )
phone_no = request.POST.get('phone_no', )
mail_id = request.POST.get('mail_id',)
address = request.POST.get('address',)
district = request.POST.get('district',)
branch = request.POST.get('branch',)
account_type = request.POST.get('account_type',)

Bank = bank(name=name,dob=dob,age=age,gender=gender,phone_no=phone_no,
mail_id=mail_id,address=address,district=district,
branch=branch,account_type=account_type,)

Bank.save()
messages.info(request, 'Bank added successfully')
return redirect('home')
return render(request,'add.html')

This is my views.py page. 
On Tuesday, August 22, 2023 at 12:49:39 AM UTC+5:30 Mike Simkins wrote:

> Did you regenerate and rerun the migrations ??
>
>
> python manage.py makemigrations
> python manage.py migrate
>
>
>
> On 21 Aug 2023, at 09:46, meenu loranz  wrote:
>
> Thank you for your response...i changed DOB to dob...but still showing me 
> the error...
> OperationalError at /add/ table bank_app_bank has no column named dob 
> Request Method: 
> POST 
> Request URL: 
> http://127.0.0.1:8000/add/ 
> Django Version: 
> 4.2 
> Exception Type: 
> OperationalError 
> Exception Value: 
> table bank_app_bank has no column named dob 
> Exception Location: 
> C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py,
>  
> line 328, in execute 
> Raised during: 
> bank_app.views.add_form 
> Python Executable: 
> C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe 
> Python Version: 
> 3.9.0 
> Python Path: 
> ['C:\\Users\\Admin\\myprojects\\banking_system\\bank_project', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
>  
>
> Server time: 
> Mon, 21 Aug 2023 08:44:34 +
>
> On Saturday, August 19, 2023 at 10:49:13 PM UTC+5:30 RANGA BHARATH JINKA 
> wrote:
>
>> Hi,
>>
>> Try changing DOB to small letters dob and run the migrations again. 
>>
>> All the best 👍
>>
>> Thanks and Regards
>>
>> J. Ranga Bharath
>> Cell: 9110334114
>> 
>>
>> On Sat, 19 Aug 2023, 9:18 pm ivan harold,  wrote:
>>
>>>
>>> https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column
>>>
>>> Try reading this article, it may help you.
>>>
>>> On Saturday, August 19, 2023 at 3:05:57 AM UTC+8 meenu loranz wrote:
>>>
>>>> from django.contrib.auth.models import User
>>>> from django.db import models
>>>> from django.urls import reverse
>>>> # Create your models here.
>>>>
>>>> class bank(models.Model):
>>>> name = models.CharField(max_length=255)
>>>> DOB = models.DateField()
>>>> age = models.IntegerField()
>>>> gender = models.CharField(max_length=10)
>>>> phone_no = models.CharField(max_length=10)
>>>> mail_id = models.EmailField(max_length=25)
>>>> address = models.CharField(max_length=255)
>>>> district = models.CharField(max_length=100)
>>>> branch = models.CharField(max_length=100)
>>>> account_type = models.CharField(max_length=100)
>>>> # materials_provided = models.CharField(max_length=100)
>>>>
>>>>
>>>> def __str__(self):

Re: table bank_app_bank has no column named DOB

2023-08-23 Thread Kani Sbt
delete all the migrations without init.py , then delete SQLite file , then 
do makemigrations and migrate

On Tuesday, 22 August 2023 at 13:50:01 UTC+5:30 meenu loranz wrote:

>
> Yes i delete that 0001_initial.py page and rerun the migration codes and 
> run the server. But it dosen't work for me..
>
> On Tuesday, August 22, 2023 at 12:49:39 AM UTC+5:30 Mike Simkins wrote:
>
>> Did you regenerate and rerun the migrations ??
>>
>>
>> python manage.py makemigrations
>> python manage.py migrate
>>
>>
>>
>> On 21 Aug 2023, at 09:46, meenu loranz  wrote:
>>
>> Thank you for your response...i changed DOB to dob...but still showing me 
>> the error...
>> OperationalError at /add/ table bank_app_bank has no column named dob 
>> Request Method: 
>> POST 
>> Request URL: 
>> http://127.0.0.1:8000/add/ 
>> Django Version: 
>> 4.2 
>> Exception Type: 
>> OperationalError 
>> Exception Value: 
>> table bank_app_bank has no column named dob 
>> Exception Location: 
>> C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py,
>>  
>> line 328, in execute 
>> Raised during: 
>> bank_app.views.add_form 
>> Python Executable: 
>> C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe 
>> Python Version: 
>> 3.9.0 
>> Python Path: 
>> ['C:\\Users\\Admin\\myprojects\\banking_system\\bank_project', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip',
>>  
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39', 
>> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
>>  
>>
>> Server time: 
>> Mon, 21 Aug 2023 08:44:34 +
>>
>> On Saturday, August 19, 2023 at 10:49:13 PM UTC+5:30 RANGA BHARATH JINKA 
>> wrote:
>>
>>> Hi,
>>>
>>> Try changing DOB to small letters dob and run the migrations again. 
>>>
>>> All the best 👍
>>>
>>> Thanks and Regards
>>>
>>> J. Ranga Bharath
>>> Cell: 9110334114
>>> 
>>>
>>> On Sat, 19 Aug 2023, 9:18 pm ivan harold,  wrote:
>>>
>>>>
>>>> https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column
>>>>
>>>> Try reading this article, it may help you.
>>>>
>>>> On Saturday, August 19, 2023 at 3:05:57 AM UTC+8 meenu loranz wrote:
>>>>
>>>>> from django.contrib.auth.models import User
>>>>> from django.db import models
>>>>> from django.urls import reverse
>>>>> # Create your models here.
>>>>>
>>>>> class bank(models.Model):
>>>>> name = models.CharField(max_length=255)
>>>>> DOB = models.DateField()
>>>>> age = models.IntegerField()
>>>>> gender = models.CharField(max_length=10)
>>>>> phone_no = models.CharField(max_length=10)
>>>>> mail_id = models.EmailField(max_length=25)
>>>>> address = models.CharField(max_length=255)
>>>>> district = models.CharField(max_length=100)
>>>>> branch = models.CharField(max_length=100)
>>>>> account_type = models.CharField(max_length=100)
>>>>> # materials_provided = models.CharField(max_length=100)
>>>>>
>>>>>
>>>>> def __str__(self):
>>>>> return self.name
>>>>>
>>>>> This is my model.py page. And i can see this table and all fields in 
>>>>> my database. But while running show me the operational error that no 
>>>>> column 
>>>>> named DOB. How can i fix this?
>>>>>
>>>>>
>>>> -- 
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>> -- 
>> 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...@googlegroups.com.
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/3166bd2f-a556-49ce-9813-6794a3aac838n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/3166bd2f-a556-49ce-9813-6794a3aac838n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/73b81116-7691-421e-b783-7be57b5e12ben%40googlegroups.com.


Re: table bank_app_bank has no column named DOB

2023-08-22 Thread meenu loranz

Yes i delete that 0001_initial.py page and rerun the migration codes and 
run the server. But it dosen't work for me..

On Tuesday, August 22, 2023 at 12:49:39 AM UTC+5:30 Mike Simkins wrote:

> Did you regenerate and rerun the migrations ??
>
>
> python manage.py makemigrations
> python manage.py migrate
>
>
>
> On 21 Aug 2023, at 09:46, meenu loranz  wrote:
>
> Thank you for your response...i changed DOB to dob...but still showing me 
> the error...
> OperationalError at /add/ table bank_app_bank has no column named dob 
> Request Method: 
> POST 
> Request URL: 
> http://127.0.0.1:8000/add/ 
> Django Version: 
> 4.2 
> Exception Type: 
> OperationalError 
> Exception Value: 
> table bank_app_bank has no column named dob 
> Exception Location: 
> C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py,
>  
> line 328, in execute 
> Raised during: 
> bank_app.views.add_form 
> Python Executable: 
> C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe 
> Python Version: 
> 3.9.0 
> Python Path: 
> ['C:\\Users\\Admin\\myprojects\\banking_system\\bank_project', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
>  
>
> Server time: 
> Mon, 21 Aug 2023 08:44:34 +
>
> On Saturday, August 19, 2023 at 10:49:13 PM UTC+5:30 RANGA BHARATH JINKA 
> wrote:
>
>> Hi,
>>
>> Try changing DOB to small letters dob and run the migrations again. 
>>
>> All the best 👍
>>
>> Thanks and Regards
>>
>> J. Ranga Bharath
>> Cell: 9110334114
>> 
>>
>> On Sat, 19 Aug 2023, 9:18 pm ivan harold,  wrote:
>>
>>>
>>> https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column
>>>
>>> Try reading this article, it may help you.
>>>
>>> On Saturday, August 19, 2023 at 3:05:57 AM UTC+8 meenu loranz wrote:
>>>
>>>> from django.contrib.auth.models import User
>>>> from django.db import models
>>>> from django.urls import reverse
>>>> # Create your models here.
>>>>
>>>> class bank(models.Model):
>>>> name = models.CharField(max_length=255)
>>>> DOB = models.DateField()
>>>> age = models.IntegerField()
>>>> gender = models.CharField(max_length=10)
>>>> phone_no = models.CharField(max_length=10)
>>>> mail_id = models.EmailField(max_length=25)
>>>> address = models.CharField(max_length=255)
>>>> district = models.CharField(max_length=100)
>>>> branch = models.CharField(max_length=100)
>>>> account_type = models.CharField(max_length=100)
>>>> # materials_provided = models.CharField(max_length=100)
>>>>
>>>>
>>>> def __str__(self):
>>>> return self.name
>>>>
>>>> This is my model.py page. And i can see this table and all fields in my 
>>>> database. But while running show me the operational error that no column 
>>>> named DOB. How can i fix this?
>>>>
>>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
> -- 
> 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...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/3166bd2f-a556-49ce-9813-6794a3aac838n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/3166bd2f-a556-49ce-9813-6794a3aac838n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/60be294e-a901-4b74-a30b-54f8154130e6n%40googlegroups.com.


Re: table bank_app_bank has no column named DOB

2023-08-21 Thread Mike Simkins
Did you regenerate and rerun the migrations ??


python manage.py makemigrations
python manage.py migrate



> On 21 Aug 2023, at 09:46, meenu loranz  wrote:
> 
> Thank you for your response...i changed DOB to dob...but still showing me the 
> error...
> OperationalError at /add/ table bank_app_bank has no column named dob 
> Request Method: 
> POST 
> Request URL: 
> http://127.0.0.1:8000/add/ 
> Django Version: 
> 4.2 
> Exception Type: 
> OperationalError 
> Exception Value: 
> table bank_app_bank has no column named dob 
> Exception Location: 
> C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py,
>  line 328, in execute 
> Raised during: 
> bank_app.views.add_form 
> Python Executable: 
> C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe 
> Python Version: 
> 3.9.0 
> Python Path: 
> ['C:\\Users\\Admin\\myprojects\\banking_system\\bank_project', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39', 
> 'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
>  
> Server time: 
> Mon, 21 Aug 2023 08:44:34 +
> 
> On Saturday, August 19, 2023 at 10:49:13 PM UTC+5:30 RANGA BHARATH JINKA 
> wrote:
>> Hi,
>> 
>> Try changing DOB to small letters dob and run the migrations again. 
>> 
>> All the best 👍
>> 
>> Thanks and Regards
>> 
>> J. Ranga Bharath
>> Cell: 9110334114
>>
>> 
>> On Sat, 19 Aug 2023, 9:18 pm ivan harold, > wrote:
>>> https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column
>>> 
>>> Try reading this article, it may help you.
>>> 
>>> On Saturday, August 19, 2023 at 3:05:57 AM UTC+8 meenu loranz wrote:
>>>> from django.contrib.auth.models import User
>>>> from django.db import models
>>>> from django.urls import reverse
>>>> # Create your models here.
>>>> 
>>>> class bank(models.Model):
>>>> name = models.CharField(max_length=255)
>>>> DOB = models.DateField()
>>>> age = models.IntegerField()
>>>> gender = models.CharField(max_length=10)
>>>> phone_no = models.CharField(max_length=10)
>>>> mail_id = models.EmailField(max_length=25)
>>>> address = models.CharField(max_length=255)
>>>> district = models.CharField(max_length=100)
>>>> branch = models.CharField(max_length=100)
>>>> account_type = models.CharField(max_length=100)
>>>> # materials_provided = models.CharField(max_length=100)
>>>> 
>>>> 
>>>> def __str__(self):
>>>> return self.name
>>>> 
>>>> This is my model.py page. And i can see this table and all fields in my 
>>>> database. But while running show me the operational error that no column 
>>>> named DOB. How can i fix this?
>>>> 
>>> 
>>> 
>> 
>>> -- 
>>> 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...@googlegroups.com <>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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.com 
> <mailto:django-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/3166bd2f-a556-49ce-9813-6794a3aac838n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/3166bd2f-a556-49ce-9813-6794a3aac838n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2040EB80-115E-4242-8582-90C62B6878F3%40gmail.com.


Re: table bank_app_bank has no column named DOB

2023-08-21 Thread meenu loranz
Thank you for your response...i changed DOB to dob...but still showing me 
the error...
OperationalError at /add/ table bank_app_bank has no column named dob 
Request Method: 
POST 
Request URL: 
http://127.0.0.1:8000/add/ 
Django Version: 
4.2 
Exception Type: 
OperationalError 
Exception Value: 
table bank_app_bank has no column named dob 
Exception Location: 
C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\sqlite3\base.py,
 
line 328, in execute 
Raised during: 
bank_app.views.add_form 
Python Executable: 
C:\Users\Admin\AppData\Local\Programs\Python\Python39\python.exe 
Python Version: 
3.9.0 
Python Path: 
['C:\\Users\\Admin\\myprojects\\banking_system\\bank_project', 
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip', 
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib', 
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39', 
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages']
 

Server time: 
Mon, 21 Aug 2023 08:44:34 +

On Saturday, August 19, 2023 at 10:49:13 PM UTC+5:30 RANGA BHARATH JINKA 
wrote:

> Hi,
>
> Try changing DOB to small letters dob and run the migrations again. 
>
> All the best 👍
>
> Thanks and Regards
>
> J. Ranga Bharath
> Cell: 9110334114
> 
>
> On Sat, 19 Aug 2023, 9:18 pm ivan harold,  wrote:
>
>>
>> https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column
>>
>> Try reading this article, it may help you.
>>
>> On Saturday, August 19, 2023 at 3:05:57 AM UTC+8 meenu loranz wrote:
>>
>>> from django.contrib.auth.models import User
>>> from django.db import models
>>> from django.urls import reverse
>>> # Create your models here.
>>>
>>> class bank(models.Model):
>>> name = models.CharField(max_length=255)
>>> DOB = models.DateField()
>>> age = models.IntegerField()
>>> gender = models.CharField(max_length=10)
>>> phone_no = models.CharField(max_length=10)
>>> mail_id = models.EmailField(max_length=25)
>>> address = models.CharField(max_length=255)
>>> district = models.CharField(max_length=100)
>>> branch = models.CharField(max_length=100)
>>> account_type = models.CharField(max_length=100)
>>> # materials_provided = models.CharField(max_length=100)
>>>
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>> This is my model.py page. And i can see this table and all fields in my 
>>> database. But while running show me the operational error that no column 
>>> named DOB. How can i fix this?
>>>
>>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3166bd2f-a556-49ce-9813-6794a3aac838n%40googlegroups.com.


Re: table bank_app_bank has no column named DOB

2023-08-19 Thread RANGA BHARATH JINKA
Hi,

Try changing DOB to small letters dob and run the migrations again.

All the best 👍

Thanks and Regards

J. Ranga Bharath
Cell: 9110334114


On Sat, 19 Aug 2023, 9:18 pm ivan harold,  wrote:

>
> https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column
>
> Try reading this article, it may help you.
>
> On Saturday, August 19, 2023 at 3:05:57 AM UTC+8 meenu loranz wrote:
>
>> from django.contrib.auth.models import User
>> from django.db import models
>> from django.urls import reverse
>> # Create your models here.
>>
>> class bank(models.Model):
>> name = models.CharField(max_length=255)
>> DOB = models.DateField()
>> age = models.IntegerField()
>> gender = models.CharField(max_length=10)
>> phone_no = models.CharField(max_length=10)
>> mail_id = models.EmailField(max_length=25)
>> address = models.CharField(max_length=255)
>> district = models.CharField(max_length=100)
>> branch = models.CharField(max_length=100)
>> account_type = models.CharField(max_length=100)
>> # materials_provided = models.CharField(max_length=100)
>>
>>
>> def __str__(self):
>> return self.name
>>
>> This is my model.py page. And i can see this table and all fields in my
>> database. But while running show me the operational error that no column
>> named DOB. How can i fix this?
>>
>> --
> 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.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com
> 
> .
>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK5m317qD71DXtVnCo%2Bypxf4zAhquzNigBMov4k672qXBcOuUw%40mail.gmail.com.


Re: table bank_app_bank has no column named DOB

2023-08-19 Thread ivan harold
https://stackoverflow.com/questions/68269165/why-django-is-not-detecting-my-table-column

Try reading this article, it may help you.

On Saturday, August 19, 2023 at 3:05:57 AM UTC+8 meenu loranz wrote:

> from django.contrib.auth.models import User
> from django.db import models
> from django.urls import reverse
> # Create your models here.
>
> class bank(models.Model):
> name = models.CharField(max_length=255)
> DOB = models.DateField()
> age = models.IntegerField()
> gender = models.CharField(max_length=10)
> phone_no = models.CharField(max_length=10)
> mail_id = models.EmailField(max_length=25)
> address = models.CharField(max_length=255)
> district = models.CharField(max_length=100)
> branch = models.CharField(max_length=100)
> account_type = models.CharField(max_length=100)
> # materials_provided = models.CharField(max_length=100)
>
>
> def __str__(self):
> return self.name
>
> This is my model.py page. And i can see this table and all fields in my 
> database. But while running show me the operational error that no column 
> named DOB. How can i fix this?
>
>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1aaf9e41-e11c-43bb-bda9-17b609814059n%40googlegroups.com.


Re: table bank_app_bank has no column named DOB

2023-08-19 Thread Joe Reitman
You can not use all caps as a field name. Some other restrictions are:

   - A field name cannot be a Python reserved word.
   - A field name cannot contain more than one underscore in a row.
   - A field name cannot start with an underscore.



On Friday, August 18, 2023 at 2:05:57 PM UTC-5 meenu loranz wrote:

> from django.contrib.auth.models import User
> from django.db import models
> from django.urls import reverse
> # Create your models here.
>
> class bank(models.Model):
> name = models.CharField(max_length=255)
> DOB = models.DateField()
> age = models.IntegerField()
> gender = models.CharField(max_length=10)
> phone_no = models.CharField(max_length=10)
> mail_id = models.EmailField(max_length=25)
> address = models.CharField(max_length=255)
> district = models.CharField(max_length=100)
> branch = models.CharField(max_length=100)
> account_type = models.CharField(max_length=100)
> # materials_provided = models.CharField(max_length=100)
>
>
> def __str__(self):
> return self.name
>
> This is my model.py page. And i can see this table and all fields in my 
> database. But while running show me the operational error that no column 
> named DOB. How can i fix this?
>
>

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b4fd8ac8-553f-4980-9754-bd9fedfd8409n%40googlegroups.com.


table bank_app_bank has no column named DOB

2023-08-18 Thread meenu loranz
from django.contrib.auth.models import User
from django.db import models
from django.urls import reverse
# Create your models here.

class bank(models.Model):
name = models.CharField(max_length=255)
DOB = models.DateField()
age = models.IntegerField()
gender = models.CharField(max_length=10)
phone_no = models.CharField(max_length=10)
mail_id = models.EmailField(max_length=25)
address = models.CharField(max_length=255)
district = models.CharField(max_length=100)
branch = models.CharField(max_length=100)
account_type = models.CharField(max_length=100)
# materials_provided = models.CharField(max_length=100)


def __str__(self):
return self.name

This is my model.py page. And i can see this table and all fields in my 
database. But while running show me the operational error that no column 
named DOB. How can i fix this?

-- 
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.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6c189bb5-4e00-498d-b184-300d97ba4a0dn%40googlegroups.com.