Giter VIP home page Giter VIP logo

karl's Introduction

Get Started Quickly With Karl

PostgreSQL

Karl requires PostgreSQL be installed on your system. 9.4 or higher is required.

Relstorage

Create the user and database for the PostgreSQL/Relstorge based instance of Karl:

$ createuser -P karltest
  (Enter 'test' for password.  Repeat.  Answer 'n' to next three questions.)
$ createdb -O karltest karltest

Later, if you want to blow away the database and start over:

$ dropdb karltest; createdb -O karltest karltest

Buildout

Check out the buildout from github:

$ git clone [email protected]:karlproject/karl.git
$ cd karl

Create a virtual environment and run the buildout:

$ virtualenv -p python2.7 .
$ bin/python bootstrap-buildout.py
$ bin/buildout

Karl is now built and ready to run. To start Karl and some support processes:

$ bin/supervisord

You can see what's running with:

$ bin/supervisorctl status

At least the karl process should be running.

You'll need to apply some Postgres schema updates with:

$ bin/pgevolve -l

Visit the test instance of Karl at:

http://localhost:6543/

Default login and password are admin/admin.

To shutdown all of the processes, use:

$ bin/supervisorctl shutdown

Localization of date formats

Karl uses the Globalize javascript library to handle date formatting. It is recommended that whenever you need to use a date in a Karl or customization package template, you use Karl's globalize mechanism instead of formatting the date in Python code.

To use gloablize, it's best to serve the date to the template in one of two formats: 'dd/mm/yyyy' for dates and 'dd/mm/yyyy hh:mm:ss' for dates with times. In the template, the date has to be by itself inside a tag and must use one of the globalize classes:

  • globalize-short-date: MM/dd/yyyy (02/15/2012)
  • globalize-long-date: MMMM dd yyyy (February 15 2012)
  • globalize-full-date: dddd, MMMM dd yyyy HH:mm (Wednesday, February 15 2012 12:00)
  • globalize-date-time: M/d/yyyy HH:mm (2/15/2012 12:00)
  • globalize-calendar-full: dddd M/d (Wednesday 2/15)
  • globalize-calendar-abbr: ddd M/d (Wed 2/15)
  • globalize-calendar-long: dddd, MMMM d (Wednesday, February 15)
  • globalize-calendar-list: ddd, MMM d (Wed, Feb 15)

Globalize will convert the date to the proper format for the current culture on page load. Default culture is en-US.

As an example:

<h3 class="globalize-long-date">02/15/2012</h3>

Will display an h3 title with the date 'February 15 2012'. The same date will show up as '15 February 2012' if the user has 'europe' as date format default.

Hacking

To hack on some source code:

$ bin/develop co osi
$ bin/buildout -No

Source code will now be in src/osi.

When playing with the code it's usually very useful to have some sample content added to the site, so that it looks a bit closer to a real site. The karlserve command can be used for that:

$ bin/karlserve samplegen

Using this command 10 sample communities will be added to the site, each with their own wikis, blogs, calendars and files.

The samplegen command does not create intranets, so they need to be added manually if they are required. To do that visit your instance at:

http://localhost:6543/pg/add_community.html

Fill the form to add a community, making sure the 'intranets' checkbox is selected. An 'intranets' tab will be visible on the community pages after that, from which new intranets can be added.

If you need to work with versioning, you need to initialize the repository before the versioning UI will show up. This is done with:

$ bin/karlserve init_repozitory pg

If you are working on frontend static assets (JS, CSS) then you need to re-build the "compiled" JS and CSS:

  • cd src/karl
  • npm install
  • node_modules/.bin/gulp install

Enjoy!

karl's People

Contributors

blaflamme avatar cdw9 avatar cguardia avatar claytron avatar davidblewett avatar hathawsh avatar jimbglenn avatar jimfulton avatar jpglenn09 avatar mcdonc avatar mnaberez avatar pauleveritt avatar rafrombrc avatar reebalazs avatar rmarianski avatar tseaver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

karl's Issues

Cannot add column to people section

Steps to reproduce:

Go to /people/admin.html

Add a section or navigate to an already added section.

In a section, select 'Add'->'Column' from pulldown. You will be redirected to /people/

/add_column.html, which results in a Not Found error. There are no registrations for 'add_column.html' in the ZCML.

blob cache misconfigured

Each new release gets a new cache, which is wasteful and can lead to a disk-full situation if releases aren't cleaned up.

Can't buildout, Permission denied (publickey)

bin/buildout -U
Getting distribution for 'mr.developer'.
build/bdist.linux-x86_64/egg/mr/developer/svn.py:69: SyntaxWarning: name '_svn_version_warning' is used prior to global declaration
global _svn_version_warning
/home/pyvenv/usr/lib/karl3/eggs/tmpUp78Cm/mr.developer-1.16-py2.6.egg/mr/developer/svn.py:69: SyntaxWarning: name '_svn_version_warning' is used prior to global declaration
global _svn_version_warning
/home/pyvenv/usr/lib/karl3/eggs/mr.developer-1.16-py2.6.egg/mr/developer/svn.py:69: SyntaxWarning: name '_svn_version_warning' is used prior to global declaration
global _svn_version_warning
/home/pyvenv/usr/lib/karl3/eggs/mr.developer-1.16-py2.6.egg/mr/developer/svn.py:69: SyntaxWarning: name '_svn_version_warning' is used prior to global declaration
global _svn_version_warning
Got mr.developer 1.16.
Getting distribution for 'argparse'.
zip_safe flag not set; analyzing archive contents...
Got argparse 1.1.
mr.developer: Queued 'ariadne' for checkout.
mr.developer: Queued 'eurasia' for checkout.
mr.developer: Queued 'karl' for checkout.
mr.developer: Queued 'karl.external_link_ticket' for checkout.
mr.developer: Queued 'karlserve' for checkout.
mr.developer: Queued 'osi' for checkout.
mr.developer: Queued 'ospc' for checkout.
mr.developer: Queued 'oxfam' for checkout.
mr.developer: Cloned 'karlserve' with git.
mr.developer: git cloning for 'karlserve' failed.
mr.developer: Permission denied (publickey).
mr.developer: fatal: The remote end hung up unexpectedly
mr.developer:
mr.developer: Cloned 'ariadne' with git.
mr.developer: git cloning for 'ariadne' failed.
mr.developer: Permission denied (publickey).
mr.developer: fatal: The remote end hung up unexpectedly
mr.developer:
mr.developer: Cloned 'eurasia' with git.
mr.developer: git cloning for 'eurasia' failed.
mr.developer: Permission denied (publickey).
mr.developer: fatal: The remote end hung up unexpectedly
mr.developer:
mr.developer: Cloned 'karl' with git.
mr.developer: git cloning for 'karl' failed.
mr.developer: Permission denied (publickey).
mr.developer: fatal: The remote end hung up unexpectedly
mr.developer:
mr.developer: Checked out 'karl.external_link_ticket' with subversion.
mr.developer: Subversion checkout for 'karl.external_link_ticket' failed.
mr.developer: svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
mr.developer: svn: Network connection closed unexpectedly
mr.developer:
mr.developer: There have been errors, see messages above.

It's Python-2.6

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.