Commit cd5b903b authored by jmAmador's avatar jmAmador

accomplished the first part of the models

parent a296764e
Pipeline #2880 failed with stages
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4"> <module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$">
<orderEntry type="inheritedJdk" /> <excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.10 (midterm-group3)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="PyDocumentationSettings"> <component name="PyDocumentationSettings">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (guitar-206105-203433)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (midterm-group3)" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
</project> </project>
\ No newline at end of file
# Generated by Django 4.1.7 on 2023-02-28 07:09
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='IndexCard',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('description', models.CharField(max_length=10000)),
('course', models.CharField(max_length=10000)),
('perfect_score', models.IntegerField()),
('passing_score', models.IntegerField()),
],
),
]
from django.db import models from django.db import models
# Create your models here. # Create your models here.
class IndexCard(models.Model):
name = models.CharField(max_length=100)
description = models.CharField(max_length=10000)
course = models.CharField(max_length=10000)
perfect_score = models.IntegerField()
passing_score = models.IntegerField()
from django.urls import path
from .views import index
urlpatterns = [
path('', index, name='index'),
]
# This might be needed, depending on your Django version
app_name = "Assignments"
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse
# Create your views here. # Create your view here.
def index(request):
return HttpResponse('Hello World! This came from the Assignments view')
...@@ -37,6 +37,7 @@ INSTALLED_APPS = [ ...@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'Assignments',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -14,8 +14,9 @@ Including another URLconf ...@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path, include
urlpatterns = [ urlpatterns = [
path('Assignments/', include('Assignments.urls', namespace="Assignments")),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment