Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nisargaa20 committed Mar 28, 2024
1 parent 0d738a0 commit bfd5d79
Show file tree
Hide file tree
Showing 9,311 changed files with 2,007,112 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added __pycache__/manage.cpython-311.pyc
Binary file not shown.
Empty file added buyer/__init__.py
Empty file.
Binary file added buyer/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added buyer/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file added buyer/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file added buyer/__pycache__/models.cpython-311.pyc
Binary file not shown.
Binary file added buyer/__pycache__/views.cpython-311.pyc
Binary file not shown.
6 changes: 6 additions & 0 deletions buyer/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.contrib import admin
from buyer.models import Buyer


# Register your models here.
admin.site.register(Buyer)
6 changes: 6 additions & 0 deletions buyer/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class BuyerConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'buyer'
26 changes: 26 additions & 0 deletions buyer/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 5.0 on 2023-12-28 09:48

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Buyer',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('full_name', models.CharField(max_length=255)),
('email', models.EmailField(max_length=254, unique=True)),
('password', models.CharField(max_length=255)),
('profile_pic', models.FileField(default='sad.jpg', upload_to='buyer_pics')),
('address', models.CharField(max_length=255)),
('mobile', models.CharField(max_length=255)),
],
),
]
18 changes: 18 additions & 0 deletions buyer/migrations/0002_alter_buyer_profile_pic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0 on 2023-12-28 13:37

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('buyer', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='buyer',
name='profile_pic',
field=models.FileField(default='sad.jpg', upload_to='buyer_pics'),
),
]
Empty file added buyer/migrations/__init__.py
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions buyer/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.db import models

# Create your models here.
# one model = one python class = one table in database

class Buyer(models.Model):
full_name = models.CharField(max_length = 255)
email = models.EmailField(unique = True)
password = models.CharField(max_length = 255)
profile_pic = models.FileField(upload_to = 'buyer_pics', default='sad.jpg')
address = models.CharField(max_length = 255)
mobile = models.CharField(max_length = 255)

def __str__(self):
return self.full_name
Loading

0 comments on commit bfd5d79

Please sign in to comment.