diff --git a/amadeus/static/css/base/amadeus.css b/amadeus/static/css/base/amadeus.css
index 5d86939..956fd99 100755
--- a/amadeus/static/css/base/amadeus.css
+++ b/amadeus/static/css/base/amadeus.css
@@ -2,13 +2,13 @@
/* sidebar menu */
#sidebar-menu{
- margin-left: 10%;
+ margin-left: 30%;
}
#sidebar-menu > .item{
font-size: 45px;
background-color: #26A69A;
color: white;
- width: 50%;
+ width: 80%;
margin-bottom: 3%;
}
@@ -20,7 +20,7 @@
#sidebar-menu > .item i {
- margin-left: 10%;
+ margin-left: 15%;
}
/* side bar menu ends*/
diff --git a/amadeus/static/nothing.txt b/amadeus/static/nothing.txt
deleted file mode 100644
index e69de29..0000000
--- a/amadeus/static/nothing.txt
+++ /dev/null
diff --git a/amadeus/templates/base.html b/amadeus/templates/base.html
index 4b9c7df..637b62e 100644
--- a/amadeus/templates/base.html
+++ b/amadeus/templates/base.html
@@ -70,7 +70,7 @@
-
+
diff --git a/categories/forms.py b/categories/forms.py
index f2e13ae..032c7f8 100644
--- a/categories/forms.py
+++ b/categories/forms.py
@@ -5,3 +5,7 @@ class CategoryForm(forms.ModelForm):
class Meta:
model = Category
fields = ('category_father', 'name', 'description', 'visible', 'coordinators', )
+ widgets = {
+ 'category_father': forms.Select(),
+
+ }
\ No newline at end of file
diff --git a/categories/migrations/0002_auto_20161223_1504.py b/categories/migrations/0002_auto_20161223_1504.py
new file mode 100644
index 0000000..cdfe721
--- /dev/null
+++ b/categories/migrations/0002_auto_20161223_1504.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10 on 2016-12-23 18:04
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('categories', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='category',
+ name='category_father',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='category_parent', to='categories.Category'),
+ ),
+ ]
diff --git a/categories/models.py b/categories/models.py
index 95d160a..08e7d81 100644
--- a/categories/models.py
+++ b/categories/models.py
@@ -6,7 +6,7 @@ from users.models import User
class Category(models.Model):
"""Represents a Course """
- category_father = models.ForeignKey('Category', related_name =_("category_parent"), on_delete = models.CASCADE)
+ category_father = models.ForeignKey('Category', related_name =_("category_parent"), on_delete = models.CASCADE, null = True, blank = True)
name = models.CharField(_("Name"), max_length = 100, blank=False, null=False)
slug = AutoSlugField(_("Slug"),populate_from='name',unique=True)
description = models.CharField(_("description"), max_length = 300)
diff --git a/categories/views.py b/categories/views.py
index 401d072..ae96c8a 100644
--- a/categories/views.py
+++ b/categories/views.py
@@ -67,9 +67,9 @@ class CreateCategory(HasRoleMixin, CreateView):
login_url = reverse_lazy('users:login')
form_class = CategoryForm
template_name = 'categories/create.html'
- success_url = reverse_lazy('courses:index')
+ success_url = reverse_lazy('categories:index')
def form_valid(self, form):
self.object = form.save()
#TODO: Implement log calls
- return super(createCategory, self).form_valid(form)
+ return super(CreateCategory, self).form_valid(form)
--
libgit2 0.21.2