Added project, app, scaffolds
This commit is contained in:
0
source/lostplaces/lostplaces_app/__init__.py
Normal file
0
source/lostplaces/lostplaces_app/__init__.py
Normal file
6
source/lostplaces/lostplaces_app/admin.py
Normal file
6
source/lostplaces/lostplaces_app/admin.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
|
||||
# Register your models here.
|
||||
|
||||
admin.site.register(Place)
|
||||
5
source/lostplaces/lostplaces_app/apps.py
Normal file
5
source/lostplaces/lostplaces_app/apps.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class LostplacesAppConfig(AppConfig):
|
||||
name = 'lostplaces_app'
|
||||
25
source/lostplaces/lostplaces_app/migrations/0001_initial.py
Normal file
25
source/lostplaces/lostplaces_app/migrations/0001_initial.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 3.0.8 on 2020-07-18 20:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Place',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=50)),
|
||||
('location', models.CharField(max_length=50)),
|
||||
('latitude', models.FloatField()),
|
||||
('longitude', models.FloatField()),
|
||||
('description', models.TextField()),
|
||||
],
|
||||
),
|
||||
]
|
||||
11
source/lostplaces/lostplaces_app/models.py
Normal file
11
source/lostplaces/lostplaces_app/models.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class Place (models.Model):
|
||||
name = models.CharField(max_length=50)
|
||||
location = models.CharField(max_length=50)
|
||||
latitude = models.FloatField()
|
||||
longitude = models.FloatField()
|
||||
description = models.TextField()
|
||||
|
||||
10
source/lostplaces/lostplaces_app/templates/hello_world.html
Normal file
10
source/lostplaces/lostplaces_app/templates/hello_world.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
{{text}}
|
||||
</body>
|
||||
</html>
|
||||
3
source/lostplaces/lostplaces_app/tests.py
Normal file
3
source/lostplaces/lostplaces_app/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
Reference in New Issue
Block a user