Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend and frontend changes #2

Merged
merged 52 commits into from
Jun 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
fb166e4
Disallow null values for website_position_id in WebsiteSection
ghoshbishakh May 25, 2016
ea36417
Add more tags to bleach whitelist necessary for proper markdown rende…
ghoshbishakh May 25, 2016
c74a059
Include simplemde-markdown-editor for markdown preview
ghoshbishakh May 25, 2016
434328a
Add simplemde editor in addsection view
ghoshbishakh May 25, 2016
c4ef021
Add iframe to bleach whitelist to enable youtube embeds
ghoshbishakh May 25, 2016
8a573de
Write custom template filter for converting youtube links to embeds
ghoshbishakh May 26, 2016
49a2a7b
Remove iframe from bleach whitelist and use custom filter
ghoshbishakh May 26, 2016
4b8d41e
Style youtube embedded player
ghoshbishakh May 26, 2016
dc9f42b
Add news edit and add views and rearrange dashboard
ghoshbishakh May 29, 2016
e84590a
Display news date in home page
ghoshbishakh May 30, 2016
c7e773a
Add datetime picker plugin
ghoshbishakh May 30, 2016
24f0500
Add simple carousel in index page
ghoshbishakh May 31, 2016
9668e6a
Make youtube embeds responsive
ghoshbishakh Jun 1, 2016
4df14ae
Add publication models and views
ghoshbishakh Jun 4, 2016
a6bc969
Bug Fixes
ghoshbishakh Jun 4, 2016
5412492
Make views.py a module as it was getting large.
ghoshbishakh Jun 5, 2016
0bb1ca9
Make single templete for add/edit news
ghoshbishakh Jun 5, 2016
71e879f
Add publication entry using bibtex
ghoshbishakh Jun 5, 2016
9d247b6
Remove edit publication from index page
ghoshbishakh Jun 6, 2016
91f1148
Display publications with bibtex in cite page
ghoshbishakh Jun 6, 2016
7a3c3d9
Add delete option for publications
ghoshbishakh Jun 6, 2016
62f6249
Add delete link for news
ghoshbishakh Jun 7, 2016
c08b288
Add is_highlighted field to Publication model
ghoshbishakh Jun 7, 2016
25c11e5
Add highlight publication views
ghoshbishakh Jun 7, 2016
5cc77b0
Add highlighted publications to index page
ghoshbishakh Jun 8, 2016
a73066d
Change news view
ghoshbishakh Jun 8, 2016
5e81ad4
Add models, views and templates for editing carousel images
ghoshbishakh Jun 9, 2016
630bae1
Change navbar style and add font
ghoshbishakh Jun 10, 2016
a2b1ff9
Fix carousel bug
ghoshbishakh Jun 11, 2016
728c3a2
Fix carousel indicators
ghoshbishakh Jun 11, 2016
5563938
Style changes in code block and sections
ghoshbishakh Jun 11, 2016
d972bc0
Change index page styles and add big links
ghoshbishakh Jun 13, 2016
4fddfc4
Make navbar fixed
ghoshbishakh Jun 13, 2016
a2de186
Add installation and overview pages and add more styles
ghoshbishakh Jun 13, 2016
15eb188
Embed twitter in home page
ghoshbishakh Jun 13, 2016
9757720
Change styles in index page
ghoshbishakh Jun 13, 2016
b9fe91e
Add footer and change styles
ghoshbishakh Jun 13, 2016
c1e7e48
Add cite page styles
ghoshbishakh Jun 13, 2016
afef2e0
Add honeycomb gallery
ghoshbishakh Jun 14, 2016
cb6faa6
Style changes
ghoshbishakh Jun 14, 2016
bc3ca2c
Add navbar animation
ghoshbishakh Jun 14, 2016
b51fae8
Add dashboard login button styles
ghoshbishakh Jun 14, 2016
7b0684d
Add dashboard styles for sections news and publications
ghoshbishakh Jun 15, 2016
60e95d4
Add field to keep track of publication type like article, inproceedin…
ghoshbishakh Jun 16, 2016
cd92dc8
Fix wrong comments in templates
ghoshbishakh Jun 16, 2016
5315bdb
Use current year as the last year in copyright text in footer
ghoshbishakh Jun 16, 2016
94dc3fc
Add unused comments and codes used before for debugging
ghoshbishakh Jun 16, 2016
dd80ecd
Categorize sections into pages and fixed
ghoshbishakh Jun 17, 2016
9c38f6e
Write custom template context preprocessor to display pages in navbar
ghoshbishakh Jun 17, 2016
e956399
Add basic google plus feed fetching
ghoshbishakh Jun 19, 2016
3aba94b
Add separate honeycomb gallery
ghoshbishakh Jun 21, 2016
eceb3c2
Add support page with gitter frame and mailing list links
ghoshbishakh Jun 21, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dipy_web/settings.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ TEMPLATES = [
'django.contrib.messages.context_processors.messages',
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect',
'website.context_processor.nav_pages_processor',
],
},
},
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ python3-openid==3.0.10
requests==2.10.0
requests-oauthlib==0.6.1
six==1.10.0
bibtexparser==0.6.2

# heroku dependencies
whitenoise==3.1
Expand Down
1 change: 1 addition & 0 deletions website/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

admin.site.register(models.WebsiteSection)
admin.site.register(models.NewsPost)
admin.site.register(models.Publication)
7 changes: 7 additions & 0 deletions website/context_processor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .models import WebsiteSection


def nav_pages_processor(request):
pages = WebsiteSection.objects.filter(section_type="page",
show_in_nav=True)
return {'pages_in_nav': pages}
32 changes: 29 additions & 3 deletions website/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,41 @@
from .models import *


class EditWebsiteSectionForm(ModelForm):
class EditFixedSectionForm(ModelForm):
class Meta:
model = WebsiteSection
fields = ['title', 'body_markdown']


class AddWebsiteSectionForm(ModelForm):
class AddEditPageSectionForm(ModelForm):
class Meta:
model = WebsiteSection
fields = ['title', 'body_markdown',
'website_position_id',
'website_page']
'show_in_nav']


class AddEditNewsPostForm(ModelForm):
class Meta:
model = NewsPost
fields = ['title', 'body_markdown', 'post_date']


class AddEditPublicationForm(ModelForm):
class Meta:
model = Publication
fields = ['title', 'url', 'author', 'doi', 'entry_type',
'published_in', 'publisher', 'year_of_publication',
'month_of_publication', 'bibtex']


class AddEditCarouselImageForm(ModelForm):
class Meta:
model = CarouselImage
fields = ['image_caption', 'image_url']


class AddEditHoneycombPostForm(ModelForm):
class Meta:
model = HoneycombPost
fields = ['image_caption', 'image_url', 'target_url']
43 changes: 43 additions & 0 deletions website/migrations/0003_auto_20160602_1828.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-02 18:28
from __future__ import unicode_literals

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
('website', '0002_newspost'),
]

operations = [
migrations.CreateModel(
name='Publication',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('url', models.CharField(max_length=200)),
('author', models.CharField(max_length=200)),
('doi', models.CharField(blank=True, max_length=100, null=True)),
('journal', models.CharField(blank=True, max_length=200, null=True)),
('publisher', models.CharField(blank=True, max_length=200, null=True)),
('year_of_publication', models.CharField(blank=True, max_length=4, null=True)),
('month_of_publication', models.CharField(blank=True, max_length=4, null=True)),
('bibtex', models.TextField(blank=True, null=True)),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now_add=True)),
],
),
migrations.AlterField(
model_name='newspost',
name='post_date',
field=models.DateTimeField(default=django.utils.timezone.now),
),
migrations.AlterField(
model_name='websitesection',
name='website_position_id',
field=models.CharField(db_index=True, max_length=100, unique=True),
),
]
20 changes: 20 additions & 0 deletions website/migrations/0004_auto_20160604_0343.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-04 03:43
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('website', '0003_auto_20160602_1828'),
]

operations = [
migrations.AlterField(
model_name='publication',
name='month_of_publication',
field=models.CharField(blank=True, max_length=10, null=True),
),
]
20 changes: 20 additions & 0 deletions website/migrations/0005_publication_is_highlighted.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-07 07:31
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('website', '0004_auto_20160604_0343'),
]

operations = [
migrations.AddField(
model_name='publication',
name='is_highlighted',
field=models.BooleanField(default=False),
),
]
25 changes: 25 additions & 0 deletions website/migrations/0006_carouselimage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-09 10:16
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('website', '0005_publication_is_highlighted'),
]

operations = [
migrations.CreateModel(
name='CarouselImage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image_caption', models.CharField(max_length=200)),
('image_url', models.URLField()),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now_add=True)),
],
),
]
31 changes: 31 additions & 0 deletions website/migrations/0007_auto_20160614_0435.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-14 04:35
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('website', '0006_carouselimage'),
]

operations = [
migrations.CreateModel(
name='HoneycombPost',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('image_caption', models.CharField(max_length=200)),
('image_url', models.URLField()),
('target_url', models.URLField()),
('created', models.DateTimeField(auto_now_add=True)),
('modified', models.DateTimeField(auto_now_add=True)),
],
),
migrations.AlterField(
model_name='websitesection',
name='website_page',
field=models.CharField(choices=[('home', 'Home'), ('installation', 'Installation'), ('overview', 'Overview')], max_length=100),
),
]
25 changes: 25 additions & 0 deletions website/migrations/0008_auto_20160616_0536.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-16 05:36
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('website', '0007_auto_20160614_0435'),
]

operations = [
migrations.RenameField(
model_name='publication',
old_name='journal',
new_name='published_in',
),
migrations.AddField(
model_name='publication',
name='entry_type',
field=models.CharField(blank=True, max_length=100, null=True),
),
]
29 changes: 29 additions & 0 deletions website/migrations/0009_auto_20160616_0757.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-16 07:57
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('website', '0008_auto_20160616_0536'),
]

operations = [
migrations.RemoveField(
model_name='websitesection',
name='website_page',
),
migrations.AddField(
model_name='websitesection',
name='section_type',
field=models.CharField(choices=[('fixed', 'Fixed Section'), ('page', 'Page')], default='page', max_length=100),
),
migrations.AddField(
model_name='websitesection',
name='show_in_nav',
field=models.BooleanField(default=False),
),
]
Loading