diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index aedfdc6a..bc0204c6 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc b/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc index ce583dba..8675bb1d 100644 Binary files a/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/admin.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/models.cpython-310.pyc b/osinaweb/osinacore/__pycache__/models.cpython-310.pyc index 9000d0af..dfca4d89 100644 Binary files a/osinaweb/osinacore/__pycache__/models.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/models.cpython-310.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index 2735aca8..c7fd8d75 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/admin.py b/osinaweb/osinacore/admin.py index c253b9e8..034f32ae 100644 --- a/osinaweb/osinacore/admin.py +++ b/osinaweb/osinacore/admin.py @@ -4,12 +4,28 @@ from .models import * # Register your models here. +class RequirementInline(admin.TabularInline): + model = ProjectRequirement + extra = 1 + + +class FileInline(admin.TabularInline): + model = ProjectFile + extra = 1 + +class CredentialInline(admin.TabularInline): + model = ProjectCredential + extra = 1 + +class ProjectAdmin(admin.ModelAdmin): + inlines=[RequirementInline, FileInline, CredentialInline] + admin.site.register(Reference) admin.site.register(Business) admin.site.register(CustomerProfile) admin.site.register(StaffProfile) admin.site.register(ProjectType) -admin.site.register(Project) +admin.site.register(Project, ProjectAdmin) admin.site.register(Milestone) admin.site.register(Epic) admin.site.register(Note) diff --git a/osinaweb/osinacore/migrations/0012_projectrequirement.py b/osinaweb/osinacore/migrations/0012_projectrequirement.py new file mode 100644 index 00000000..3929a98a --- /dev/null +++ b/osinaweb/osinacore/migrations/0012_projectrequirement.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.5 on 2023-09-12 10:47 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0011_note_date_alter_note_color_alter_note_text_and_more'), + ] + + operations = [ + migrations.CreateModel( + name='ProjectRequirement', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('content', models.CharField(max_length=350)), + ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.project')), + ], + ), + ] diff --git a/osinaweb/osinacore/migrations/0013_projectfile.py b/osinaweb/osinacore/migrations/0013_projectfile.py new file mode 100644 index 00000000..7faacccd --- /dev/null +++ b/osinaweb/osinacore/migrations/0013_projectfile.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.5 on 2023-09-12 10:57 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0012_projectrequirement'), + ] + + operations = [ + migrations.CreateModel( + name='ProjectFile', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=350)), + ('file', models.FileField(upload_to='')), + ('date', models.DateField()), + ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.project')), + ], + ), + ] diff --git a/osinaweb/osinacore/migrations/0014_alter_projectfile_file.py b/osinaweb/osinacore/migrations/0014_alter_projectfile_file.py new file mode 100644 index 00000000..6c08a89e --- /dev/null +++ b/osinaweb/osinacore/migrations/0014_alter_projectfile_file.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.5 on 2023-09-12 11:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0013_projectfile'), + ] + + operations = [ + migrations.AlterField( + model_name='projectfile', + name='file', + field=models.FileField(blank=True, upload_to=''), + ), + ] diff --git a/osinaweb/osinacore/migrations/0015_projectcredentials.py b/osinaweb/osinacore/migrations/0015_projectcredentials.py new file mode 100644 index 00000000..d69cdefa --- /dev/null +++ b/osinaweb/osinacore/migrations/0015_projectcredentials.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.5 on 2023-09-12 11:03 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0014_alter_projectfile_file'), + ] + + operations = [ + migrations.CreateModel( + name='ProjectCredentials', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('emailorusername', models.CharField(max_length=350)), + ('password', models.CharField(max_length=350)), + ('usedfor', models.CharField(max_length=350)), + ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.project')), + ], + ), + ] diff --git a/osinaweb/osinacore/migrations/0016_rename_projectcredentials_projectcredential.py b/osinaweb/osinacore/migrations/0016_rename_projectcredentials_projectcredential.py new file mode 100644 index 00000000..16a72efe --- /dev/null +++ b/osinaweb/osinacore/migrations/0016_rename_projectcredentials_projectcredential.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.5 on 2023-09-12 11:04 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0015_projectcredentials'), + ] + + operations = [ + migrations.RenameModel( + old_name='ProjectCredentials', + new_name='ProjectCredential', + ), + ] diff --git a/osinaweb/osinacore/migrations/__pycache__/0012_projectrequirement.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0012_projectrequirement.cpython-310.pyc new file mode 100644 index 00000000..bcd841c9 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0012_projectrequirement.cpython-310.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0013_projectfile.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0013_projectfile.cpython-310.pyc new file mode 100644 index 00000000..b587e4c0 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0013_projectfile.cpython-310.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0014_alter_projectfile_file.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0014_alter_projectfile_file.cpython-310.pyc new file mode 100644 index 00000000..0df4ee72 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0014_alter_projectfile_file.cpython-310.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0015_projectcredentials.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0015_projectcredentials.cpython-310.pyc new file mode 100644 index 00000000..9096ef5e Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0015_projectcredentials.cpython-310.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0016_rename_projectcredentials_projectcredential.cpython-310.pyc b/osinaweb/osinacore/migrations/__pycache__/0016_rename_projectcredentials_projectcredential.cpython-310.pyc new file mode 100644 index 00000000..6eaee858 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0016_rename_projectcredentials_projectcredential.cpython-310.pyc differ diff --git a/osinaweb/osinacore/models.py b/osinaweb/osinacore/models.py index 7cabf785..86688436 100644 --- a/osinaweb/osinacore/models.py +++ b/osinaweb/osinacore/models.py @@ -130,6 +130,24 @@ class Epic(models.Model): project = models.ForeignKey(Project, on_delete=models.CASCADE, null=True) start_date = models.DateField() end_date = models.DateField() + + +class ProjectRequirement(models.Model): + content = models.CharField(max_length=350) + project = models.ForeignKey(Project, on_delete=models.CASCADE, null=True) + + +class ProjectFile(models.Model): + name = models.CharField(max_length=350) + file = models.FileField(blank=True) + date = models.DateField() + project = models.ForeignKey(Project, on_delete=models.CASCADE, null=True) + +class ProjectCredential(models.Model): + emailorusername = models.CharField(max_length=350) + password = models.CharField(max_length=350) + usedfor = models.CharField(max_length=350) + project = models.ForeignKey(Project, on_delete=models.CASCADE, null=True) class Note(models.Model): diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index 7aab4405..d375bccd 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -93,6 +93,17 @@ def detailed_project(request, project_id): return render(request, 'project-details.html', context) +@login_required +def createtask_project(request, project_id): + project = get_object_or_404(Project, project_id=project_id) + context = { + + 'project' : project, + + } + return render(request, 'createtask-project.html', context) + + @login_required def create_project(request): context = { @@ -114,12 +125,6 @@ def create_task(request): } return render(request, 'create-task.html', context) -@login_required -def createtask_project(request): - context = { - - } - return render(request, 'createtask-project.html', context) @login_required def createtask_epic(request): diff --git a/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc b/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc index cc7b6184..b314849c 100644 Binary files a/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc and b/osinaweb/osinaweb/__pycache__/urls.cpython-310.pyc differ diff --git a/osinaweb/osinaweb/urls.py b/osinaweb/osinaweb/urls.py index 6a523166..ffeb6ec4 100644 --- a/osinaweb/osinaweb/urls.py +++ b/osinaweb/osinaweb/urls.py @@ -29,7 +29,7 @@ urlpatterns = [ path('createproject/', views.create_project, name='createproject'), path('createepic/', views.create_epic, name='createepic'), path('createtask/', views.create_task, name='createtask'), - path('createtaskproject/', views.createtask_project, name='createtaskproject'), + path('createtask//', views.createtask_project, name='createtaskproject'), path('createtaskepic/', views.createtask_epic, name='createtaskepic'), path('addstatus/', views.add_status_modal, name='addstatus'), diff --git a/osinaweb/static/dist/output.css b/osinaweb/static/dist/output.css index e9492065..a724cd5c 100644 --- a/osinaweb/static/dist/output.css +++ b/osinaweb/static/dist/output.css @@ -1256,6 +1256,11 @@ video { background-color: rgb(21 128 61 / var(--tw-bg-opacity)); } +.bg-orange-500 { + --tw-bg-opacity: 1; + background-color: rgb(249 115 22 / var(--tw-bg-opacity)); +} + .bg-orange-700 { --tw-bg-opacity: 1; background-color: rgb(194 65 12 / var(--tw-bg-opacity)); @@ -1526,6 +1531,11 @@ video { color: rgb(21 128 61 / var(--tw-text-opacity)); } +.text-orange-500 { + --tw-text-opacity: 1; + color: rgb(249 115 22 / var(--tw-text-opacity)); +} + .text-orange-700 { --tw-text-opacity: 1; color: rgb(194 65 12 / var(--tw-text-opacity)); @@ -1551,6 +1561,11 @@ video { color: rgb(255 255 255 / var(--tw-text-opacity)); } +.text-yellow-400 { + --tw-text-opacity: 1; + color: rgb(250 204 21 / var(--tw-text-opacity)); +} + .text-yellow-500 { --tw-text-opacity: 1; color: rgb(234 179 8 / var(--tw-text-opacity)); diff --git a/osinaweb/static/images/Screenshot_2023-07-17_at_5.42.13_PM.png b/osinaweb/static/images/Screenshot_2023-07-17_at_5.42.13_PM.png new file mode 100644 index 00000000..b9321335 Binary files /dev/null and b/osinaweb/static/images/Screenshot_2023-07-17_at_5.42.13_PM.png differ diff --git a/osinaweb/static/images/newosina-master_4.zip b/osinaweb/static/images/newosina-master_4.zip new file mode 100644 index 00000000..313bc7e5 Binary files /dev/null and b/osinaweb/static/images/newosina-master_4.zip differ diff --git a/osinaweb/templates/create-project.html b/osinaweb/templates/create-project.html index a6e0cfc9..b030a794 100644 --- a/osinaweb/templates/create-project.html +++ b/osinaweb/templates/create-project.html @@ -76,7 +76,7 @@ Upload Document(s) diff --git a/osinaweb/templates/createtask-project.html b/osinaweb/templates/createtask-project.html index 4ad059a1..ce1b0231 100644 --- a/osinaweb/templates/createtask-project.html +++ b/osinaweb/templates/createtask-project.html @@ -16,7 +16,7 @@