Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RemonIbrahimNashed committed Jan 27, 2018
0 parents commit 9b8eeea
Show file tree
Hide file tree
Showing 55 changed files with 1,277 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/ScrumManagementSystem.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

770 changes: 770 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
111 changes: 111 additions & 0 deletions ScrumManagementSystem/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '8a=nt+cvw6ka2@5et%9ftet!hpzv75ay5-z#($k4csd(mqhohz'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

# CUSTOM APP
'backlog',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'ScrumManagementSystem.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'ScrumManagementSystem.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}


# Password validation
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]


# Internationalization
# https://docs.djangoproject.com/en/2.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/

STATIC_URL = '/static/'
11 changes: 11 additions & 0 deletions ScrumManagementSystem/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from django.conf.urls import url
from django.contrib import admin
from backlog import views

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', views.home, name='home'),
url(r'^backlogs/(?P<pk>\d+)/$', views.backlog_sprints, name='backlog_sprints'),
url(r'^backlogs/(?P<pk>\d+)/new/$', views.new_sprint, name='new_sprint'),

]
16 changes: 16 additions & 0 deletions ScrumManagementSystem/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for ScrumManagementSystem project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ScrumManagementSystem.settings")

application = get_wsgi_application()
Empty file added backlog/__init__.py
Empty file.
Binary file added backlog/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added backlog/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added backlog/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file added backlog/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file added backlog/__pycache__/forms.cpython-35.pyc
Binary file not shown.
Binary file added backlog/__pycache__/forms.cpython-36.pyc
Binary file not shown.
Binary file added backlog/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file added backlog/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file added backlog/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file added backlog/__pycache__/views.cpython-36.pyc
Binary file not shown.
7 changes: 7 additions & 0 deletions backlog/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.contrib import admin

# Register your models here.
from backlog.models import BackLog, Sprint

admin.site.register(BackLog)
admin.site.register(Sprint)
5 changes: 5 additions & 0 deletions backlog/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class BacklogConfig(AppConfig):
name = 'backlog'
9 changes: 9 additions & 0 deletions backlog/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django import forms


class NewSprint(forms.Form):
name = forms.CharField(label="Sprint name")
dead_line = forms.DateField(widget=forms.TextInput(attrs=
{
'id': 'datepicker'
}))
52 changes: 52 additions & 0 deletions backlog/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Generated by Django 2.0.1 on 2018-01-27 17:40

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='BackLog',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=30, unique=True)),
('start_at', models.DateTimeField(auto_now_add=True)),
('end_at', models.DateField(null=True)),
('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='backlogs', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Sprint',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=25)),
('start_at', models.DateTimeField(auto_now_add=True)),
('end_at', models.DateField(null=True)),
('is_done', models.BooleanField(default=False)),
('backlog', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sprints', to='backlog.BackLog')),
],
),
migrations.CreateModel(
name='Task',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('importance', models.IntegerField()),
('status', models.IntegerField(default=1)),
('name', models.CharField(max_length=20)),
('description', models.CharField(max_length=255)),
('start_at', models.DateTimeField(auto_now_add=True)),
('end_at', models.DateTimeField()),
('assigned_user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='tasks', to=settings.AUTH_USER_MODEL)),
('sprint', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to='backlog.Sprint')),
],
),
]
33 changes: 33 additions & 0 deletions backlog/migrations/0002_auto_20180127_1951.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 2.0.1 on 2018-01-27 17:51

from django.db import migrations, models


class Migration(migrations.Migration):

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

operations = [
migrations.AlterField(
model_name='backlog',
name='start_at',
field=models.DateField(auto_now_add=True),
),
migrations.AlterField(
model_name='sprint',
name='start_at',
field=models.DateField(auto_now_add=True),
),
migrations.AlterField(
model_name='task',
name='end_at',
field=models.DateField(),
),
migrations.AlterField(
model_name='task',
name='start_at',
field=models.DateField(auto_now_add=True),
),
]
18 changes: 18 additions & 0 deletions backlog/migrations/0003_auto_20180127_2005.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.0.1 on 2018-01-27 18:05

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('backlog', '0002_auto_20180127_1951'),
]

operations = [
migrations.AlterField(
model_name='backlog',
name='start_at',
field=models.DateField(auto_now=True),
),
]
Empty file added backlog/migrations/__init__.py
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 39 additions & 0 deletions backlog/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from django.contrib.auth.models import User
from django.db import models


# Create your models here.

class BackLog(models.Model):
name = models.CharField(max_length=30, unique=True)
created_by = models.ForeignKey(User, related_name='backlogs', on_delete=models.DO_NOTHING, null=True, blank=True)
start_at = models.DateField(auto_now=True)
end_at = models.DateField(auto_now_add=False, auto_now=False, null=True)

def __str__(self):
return self.name


class Sprint(models.Model):
name = models.CharField(max_length=25)
start_at = models.DateField(auto_now_add=True)
end_at = models.DateField(auto_now_add=False, auto_now=False, null=True)
is_done = models.BooleanField(default=False)
backlog = models.ForeignKey(BackLog, related_name='sprints', on_delete=models.CASCADE)

def __str__(self):
return self.name


class Task(models.Model):
importance = models.IntegerField()
status = models.IntegerField(default=1) # 1: Not started 2: In Progress 3: Done
name = models.CharField(max_length=20)
description = models.CharField(max_length=255)
start_at = models.DateField(auto_now_add=True)
end_at = models.DateField(auto_now_add=False, auto_now=False)
assigned_user = models.ForeignKey(User, related_name='tasks', on_delete=models.DO_NOTHING)
sprint = models.ForeignKey(Sprint, related_name='tasks', on_delete=models.CASCADE)

def __str__(self):
return self.name
3 changes: 3 additions & 0 deletions backlog/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
Loading

0 comments on commit 9b8eeea

Please sign in to comment.