Giter VIP home page Giter VIP logo

festcms's Introduction

Fest Management System

Join the chat at https://gitter.im/NIT-dgp/General Build Status codecov

This is a generic Content management system made specifically for the purpose of handling the websites of college fests. It is written in Django and uses basically a Bootstrap based UI.

Prerequisites

Database

Install sqlite3 for development

python-pip

Install pip for python3

  • Windows: pip is already installed if you're using Python 2 >=2.7.9 or Python 3 >=3.4
  • Mac OS (via easy_install): sudo easy_install pip
  • Debian/Ubuntu: sudo apt-get install python3-pip
  • Fedora/CentOS: sudo yum install python-pip python-wheel

Virtual Environment Setup

Windows

  1. Setup virtual environment with pip install virtualenvwrapper-win
  2. Then create a virtual environment for your project: mkvirtualenv nameofyourproject
  3. The virtual environment will be activated automatically and you’ll see “(nameofyourproject)” next to the command prompt to designate that.
  4. If you start a new command prompt, you’ll need to activate the environment again using: workon nameofproject .

Linux

  1. Virtualenv is available on PyPI, we can install it with the pip command: pip install virtualenv
  2. Then create a virtual environment for your project: virtualenv --python=python3 nameofproject
  3. Log into the virtualenv created: source nameofproject/bin/activate

Deployment

  1. Clone the repository with git clone [email protected]:ghoshbishakh/festcms.git
  2. Enter the directory using cd festcms
  3. Copy festcms/settings.py.example to festcms/settings.py
  4. Enter any arbitary key in the SECRET_KEY field in settings.py
  5. To setup mail server, enter the details in email testing section of settings.py
  6. Ensure that you have python3 set as default. You can do this by alias python=python3
  7. Run pip install -r requirements.txt to install all dependencies
  8. Run migrations using python manage.py migrate
  9. Run server with python manage.py runserver
  10. Ok you are all set! Visit http://localhost:8000 in your browser

Setting up feedback form

  1. Create a superuser account with python manage.py createsuperuser, create your credentials.
  2. Go to http://localhost:8000/admin and enter your credentials.
  3. Create a new form in the forms section to your desire, by the name feedback and publish it.
  4. You're done. You can now test the form at http://localhost:8000/forms/feedback.
  5. You could check for submissions or make changes to the form via forms section in the admin panel.
  6. You could create any other form in a similar way.

Configuring the unified navbar

  1. Login the admin panel and create entries in the Navbar Entries section as per your requirement.
  2. Load and use the navbar tag if required in any of your custom pages.

How to send Newsletters

  1. Login the admin panel and click on the Newsletters section.
  2. Create a new newsletter to your liking and save it.
  3. Now in the Newsletter section presented, mark the letters to be sent.
  4. Choose the action Send email from the Actions menu and click Go.
  5. This sends the marked Newsletters to subscribed users.

Setting up email templates and how to use them

  1. Create HTML(.html) and text(.txt) based templates for mail with the context as per your requirements.
  2. Place both the HTML and text based files in festflow/templates/email_extras directory.
  3. Now these templates could be used anywhere within the application by using the send_mail_template method of email_extras.utils package. Eg. Suppose we have example_mail.html and example_mail.txt as our text based and HTML based templates with some context ctx, attachments atch and headers headers, then we could do the following to use the template system.
from email_extras.utils import send_mail_template

send_mail_template("Subject", 'example_mail', from_address, to_address,
    fail_silently=False, attachments=atch, context=ctx, headers=headers)

We use django-email-extras to send template based mails. The email templates should be placed in festflow/templates/email-extras/. PGP encrypted mails could also be sent via the django-email-extras module. For more information on how to configure PGP encryption module, please refer here.

We use django-forms-builder for making custom forms available via admin section. A lot of stuff could be configured as mentioned here in settings.py.

festcms's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

festcms's Issues

Show dropdown of valid urls for navbar

For an end user it is difficult to know what are the valid urls. So either display a dropdown with all the valid urls for navbar or show a list of elements that can be used in the navbar with pre-defined text.

Use uniform navbar

Use same navbar in all pages. Keep one navbar and remove all files associated with the other navbars.

Design various pages

I am listing all design related issues here. Close this after each one is fixed

  • Redesign About Us page
  • Redesign Events Page
  • Redesign Sponsors page
  • Redesign Contacts page
  • Redesign Login page

Possible design solutions can be discussed with issues before designing a page.

Custom navbar entries

Add a model for navbar entries and build a custom templatetag to display a navbar with those entries

Add CMS features in readme

When you launch the website via localhost:8000 it shows a blank white page. So you become clueless about what should be done. A proper description of the features should be written down along with how to create an admin user.

Change introduction of README

from

This is the Content management system of Ank 2016 - The Knowledge Fest of Maths N Tech club, NIT Durgapur. It is written in Django and uses basically a Bootstrap based UI.

to

This is a generic Content management system made specifically for the purpose of handling the websites of college fests. It is written in Django and uses basically a Bootstrap based UI.

Python 3.6 errors with defusedxml

defusedxml is incompatible with python3.6

Environment:


Request Method: POST
Request URL: http://localhost:8000/admin/login/?next=/admin/

Django Version: 1.8
Python Version: 3.6.0
Installed Applications:
('django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'social.apps.django_app.default',
 'festflow',
 'ckeditor',
 'ckeditor_uploader',
 'forms_builder.forms',
 'email_extras')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')


Traceback:
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/contrib/admin/sites.py" in login
  394.         return login(request, **defaults)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/utils/decorators.py" in _wrapped_view
  110.                     response = view_func(request, *args, **kwargs)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/contrib/auth/views.py" in login
  44.         if form.is_valid():
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/forms/forms.py" in is_valid
  184.         return self.is_bound and not self.errors
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/forms/forms.py" in errors
  176.             self.full_clean()
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/forms/forms.py" in full_clean
  393.         self._clean_form()
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/forms/forms.py" in _clean_form
  417.             cleaned_data = self.clean()
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/contrib/auth/forms.py" in clean
  157.                                            password=password)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in authenticate
  66.     for backend, backend_path in _get_backends(return_tuples=True):
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in _get_backends
  27.         backend = load_backend(backend_path)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in load_backend
  21.     return import_string(path)()
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/django/utils/module_loading.py" in import_string
  26.     module = import_module(module_path)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/importlib/__init__.py" in import_module
  126.     return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/social/backends/google.py" in <module>
  6. from social.backends.open_id import OpenIdAuth, OpenIdConnectAuth
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/social/backends/open_id.py" in <module>
  6. from openid.consumer.consumer import Consumer, SUCCESS, CANCEL, FAILURE
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/openid/consumer/consumer.py" in <module>
  196. from openid.consumer.discover import discover, OpenIDServiceEndpoint, \
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/openid/consumer/discover.py" in <module>
  22. from openid.yadis.etxrd import nsTag, XRDSError, XRD_NS_2_0
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/openid/yadis/etxrd.py" in <module>
  31. SafeElementTree = importSafeElementTree()
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/openid/oidutil.py" in importSafeElementTree
  83.         return importElementTree(module_names)
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/openid/oidutil.py" in importElementTree
  106.             ElementTree = __import__(mod_name, None, None, ['unused'])
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/defusedxml/cElementTree.py" in <module>
  16. from .ElementTree import DefusedXMLParser, _IterParseIterator
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/defusedxml/ElementTree.py" in <module>
  62.     _XMLParser, _iterparse, _IterParseIterator, ParseError = _get_py3_cls()
File "/Users/nkprince007/Developer/opensource/festcms-env/lib/python3.6/site-packages/defusedxml/ElementTree.py" in _get_py3_cls
  56.         _IterParseIterator = pure_pymod._IterParseIterator

Exception Type: AttributeError at /admin/login/
Exception Value: module 'xml.etree.ElementTree' has no attribute '_IterParseIterator'

Favicon not showing in several pages

The favicon in the address bar of About, Events, Sponsors page is not showing up. Though it does shows for the home page and Contact Us page.

Use SlugField in all model identifiers

Change the title of the address bar

Suggest title for address bar and change it accordingly. We can perhaps use different title for address bar in different pages. Mark this as a first-timers-only issue

Sponsor name not appearing in admin panel

screenshot from 2016-11-15 01-52-54

Sponsor name should be displayed in admin panel instead of "Sponsor Object"

Change the Sponsor model in models.py file to include a __str__ method like in other models.

Steps to reproduce:

Go to http://localhost:8000/admin/ page
Login as admin
Go to sponsors page.

Steps to fix:

In models file of festflow add a __str__ method to return the sponsor's name:

def __str__(self):
        return self.name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.