Skip to content

Commit

Permalink
improved event edit select field
Browse files Browse the repository at this point in the history
  • Loading branch information
gvlachos committed Sep 28, 2016
0 parents commit f3eaa72
Show file tree
Hide file tree
Showing 348 changed files with 24,913 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .hgignore
@@ -0,0 +1,17 @@
node_modules
grical_db.sql
grical/settings/settings.py
grical/static/bower_components
docs/_build
docs/html

syntax: glob
*.pyc
.*.swp
*.bak
*.orig
.tox

syntax: regexp
(.*/)?\#[^/]*\#$
.*\~
Empty file added .hgsubstate
Empty file.
661 changes: 661 additions & 0 deletions AGPLv3.TXT

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions CHANGELOG.rst
@@ -0,0 +1,15 @@
Version 1.0
===========

* Upgraded Django to 1.8 LTS from 1.3, updated most of requirements,
fixed deprecated code.
* Used bootstrap for css / bower for js

Incompatible changes
--------------------

* Capability to output to a Unix pipe was removed, by removing the
related custom setting: ``LOG_PIPE``.
* ``irclogger.py`` script removed, intended to be used in conjunction
the ``LOG_PIPE`` setting.

249 changes: 249 additions & 0 deletions README.rst
@@ -0,0 +1,249 @@
**grical** is a platform for events web sites. It is the software
running behind `grical.org`__. Main coding language used is
`Python`__/`Django`__.

__ http://grical.org/
__ https://python.org/
__ https://www.djangoproject.com/


Setup a development environment
===============================

The following setup uses sqlite3 as database back end, virtualenv as
isolated Python environment and Linux host system. Other combinations
are possible e.g. linux container and PostgreSQL.

Clone repository
----------------

.. FIXME migrate to github link when it is known
.. code-block:: bash
cd && hg clone ssh://hg@bitbucket.org/gridmind/grical
System packages requirements
----------------------------

Either to run tests or to setup a full working development environment
you need to install some system packages. For Ubuntu systems:

For 14.04LTS:

.. code-block:: bash
cat ~/grical/requirements/development.trusty.apt | tr '\n' ' '|xargs sudo apt-get install
For 15.04+:

.. code-block:: bash
cat ~/grical/requirements/development.xenial.apt | tr '\n' ' '|xargs sudo apt-get install
Run tests
---------

Setup `tox`_ either using system packages or with pip.

.. _tox: https://tox.readthedocs.io/

Running tests by issuing the `tox` command:

.. code-block:: bash
cd ~/grical && tox
Setup development
-----------------

Create a settings file
~~~~~~~~~~~~~~~~~~~~~~

You need a Django settings file. You just need to copy
``settings-example.py`` which is ready for development. You may use it
instead by specifying ``--settings grical.settings.settings-example``
while running management commands, however making a copy of the file
is better for convenience.

.. code-block:: bash
cd ~/grical/grical/settings && cp settings-example.py settings.py
Create a virtualenv
~~~~~~~~~~~~~~~~~~~

And then activate the virtualenv:

.. code-block:: bash
virtualenv ~/virtualenvs/grical
source ~/virtualenvs/grical/bin/activate
Assuming that you have a ``virtualenvs`` directory in your home where
you store virtualenvs.

Install python requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~

While using virtualenv:

.. code-block:: bash
cd ~/grical/requirements && pip install -r development.pip
Migrate db
~~~~~~~~~~

While using virtualenv, migrate db to create database. Then initialize
``django_site`` table:

.. code-block:: bash
cd ~/grical && python manage.py migrate
sqlite3 grical_db.sql "UPDATE django_site SET domain='localhost:8000', name='Grical development';"
Install required js/css/bower packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Install bower package manager as root:

.. code-block:: bash
sudo npm install bower -g
Install required packages for grical with bower:

.. code-block:: bash
cd ~/grical/requirements && bower install --config.directory=../grical/static/bower_components
Start /access development server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
cd ~/grical && python manage.py runserver 0.0.0.0:8000
Now you can open the site in your browser, just visit:

http://localhost:8000


Setup grical server
===================

Instructions assume installation to a Linux host and PostgreSQL 9.5.
Different setup may need some modifications to these instructions.


Setup PostgreSQL
----------------

To setup PostgreSQL 9.5, e.g. following
http://tecadmin.net/install-postgresql-server-on-ubuntu/ instructions:

.. code-block:: bash
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add -
apt-get update
Then follow next paragraph to install postgresql packages alongside
with other system packages.


Install system packages
-----------------------

.. code-block:: bash
cat ~/grical/requirements/production.apt | tr '\n' ' '|xargs sudo apt-get install
Install required js/css/bower packages
--------------------------------------

Install bower package manager as root, in container:

npm install bower -g

Install required packages for grical with bower:

cd ~/grical/requirements && bower install --config.directory=../grical/static/bower_components


Create database, db user, etc
-----------------------------

su postgres
psql
then type in psql:
CREATE EXTENSION IF NOT EXISTS postgis;
Exit psql with Ctrl+D
(possibly this step is not needed, but the next CREATE EXTENSION is
needed)

Run:
createuser --pwprompt --no-createdb --no-createrole --no-superuser grical_user
password: "grical_password"
Run:
createdb --owner grical_user -T template1 grical_db
We need also to create extension postgis for grical_db
psql -d grical_db
then run in psql:
CREATE EXTENSION IF NOT EXISTS postgis
Exit psql with Ctrl+D

logout as postgres
exit

NOTE: grical_user needs some additional roles in order to create test
databases if this is desired

# Install pip packages

(always as grical root)
cd /home/yourusername/grical/requirements/
pip install -r development.pip

In host machine
---------------

cd ~/grical/grical/settings
cp settings-example.py settings.py

edit settings.py, set `DEBUG = True` for development.
Modify DATABASES section to use postgresql. Review also other changes
required to activate CACHES etc.

Login as regular user to grical
-------------------------------
ssh grical

cd grical
python manage.py migrate

psql -d grical_db -U grical_user -h localhost -p 5432 -c "UPDATE django_site SET (domain, name) = ('grical', 'Grical development')"
(password is "grical_password")

python manage.py createcachetable cache
(if db_cache is activated in CACHES section, requiring a database)

Start the dev server
python manage.py runserver 0.0.0.0:8000

in your browser visit: http://grical:8000



Discussion
----------
<ogai> stefanos_, would be nice you just copy the travis-ci config of
dsc for grical, and create an account in travis-ci if needed using
admin@gridmind.org

78 changes: 78 additions & 0 deletions copyright.rst
@@ -0,0 +1,78 @@
Legal and meta
==============

Copyright and license
---------------------

| Copyright (C) 2010-2016 The authors
(The authors can be determined by looking into individual source files
or examining the history in the version control system.)

Permission is granted to redistribute and/or modify Grical under
the terms of the GNU Affero General Public License (AGPL) as published
by the Free Software Foundation; either version 3 of the License, or,
at your option, any later version.

Permission is granted to redistribute and/or modify the GriCalDroid
subproject under the terms of the GNU General Public License (GPL) as
published by the Free Software Foundation; either version 3 of the
License, or, at your option, any later version.

The software is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose. See the AGPL and
the GPL for more details.

You should have received a copy of AGPL and of the GPL
along with this program. If not, see
http://www.gnu.org/licenses/.


Bootstrap
---------

The Bower component bootstrap__ is copyrighted 2011-2016 by Twitter, Inc. and
licensed__ under the `MIT license`_.

__ http://getbootstrap.com
__ https://github.com/twbs/bootstrap/blob/master/LICENSE


bootstrap-datepicker
--------------------

The Bower component bootstrap_datepicker__ is copyrighted eternicode__
and licensed under the Apache_License_Version_2

__ https://github.com/eternicode/bootstrap-datepicker
__ https://github.com/eternicode
__ http://www.apache.org/licenses/LICENSE-2.0


icalicon.png
------------

The calendar small icon is

| Copyright (C) Mark James
Permission is granted to reproduce and/or modify the icon under the
terms of the `Creative Commons Attribution 3.0 License`_. Mark James'
icons are available at http://www.famfamfam.com/lab/icons/silk/.

__ Creative Commons Attribution 3.0 License: http://creativecommons.org/licenses/by/3.0/


Contact
-------

| GridMind Vorgründungsgesellschaft Iván Fernando Villanueva Barrio EU
| Malmöer Str. 6
| 10439 Berlin
| Germany
|
| Tel. +49 3039820596
| E-Mail: info ät gridmind.org
.. _MIT license: https://en.wikipedia.org/wiki/Mit_license

0 comments on commit f3eaa72

Please sign in to comment.