After signing in to the Django admin, we have not yet loaded our ATM location data from the PostgreSQL RDS into our Django web. Therefore, we have to create our database model by performing the following steps:
- The first step is to edit the models.py file; let's do it according to the following code block:
(venv) [root@ip-172-31-95-213 atmproject]# vi atmapp/models.py
------------------------------------------
from django.db import models
# Create your models here.
class ATMlocations(models.Model):
ID = models.AutoField(primary_key=True)
BankName = models.CharField(max_length=60)
Address = models.CharField(max_length=50)
County = models.CharField(max_length=15)
City = models.CharField(max_length=15)
State = models.CharField(max_length=2)
ZipCode = models.IntegerField()
class Meta:
db_table = 'ATM locations'
verbose_name = 'ATM location'
...