Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chicode-dev committed Feb 4, 2023
1 parent ec5b6c1 commit 86e519b
Show file tree
Hide file tree
Showing 23 changed files with 1,393 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/mysite/manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)


if __name__ == '__main__':
main()
Empty file added app/mysite/myapp/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions app/mysite/myapp/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.contrib import admin

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


class MyappConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'myapp'
4 changes: 4 additions & 0 deletions app/mysite/myapp/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django import forms

class SearchForm(forms.Form):
query = forms.CharField(label='Search', max_length=100)
22 changes: 22 additions & 0 deletions app/mysite/myapp/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.1.6 on 2023-02-04 13:19

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Image',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=100)),
('image', models.ImageField(upload_to='images/')),
],
),
]
Empty file.
19 changes: 19 additions & 0 deletions app/mysite/myapp/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from django.db import models

# # Create your models here.
#class Suggestion(models.Model):
# user_relationship = models.CharField(max_length=200)
# occasion = models.CharField(max_length=200)
# user_interests = models.CharField(max_length=200)
# user_budget = models.CharField(max_length=200)
# user_abilities = models.CharField(max_length=200)
# suggestion = models.TextField()

#from django.db import models

class Image(models.Model):
title = models.CharField(max_length=100)
image = models.ImageField(upload_to='images/')

def __str__(self):
return self.title
Loading

0 comments on commit 86e519b

Please sign in to comment.