The Shark Framework

Shark is a Python framework for building websites without html, css or javascript. If you want to quickly create decent looking, robust websites, Shark is for you. The core of Shark is framework independent, but Shark comes default with Django integration.

Shark is built on top of Django 1.9. It uses Bootstrap to style your controls.


Fast Development

One of the key benefits of Shark is the speed of development. It's like LEGO for the web.

Fast Code Example

Robust Code

Because you write very little code and no html, css or javascript, you can't introduce many bugs.

self.append(
    Heading('The Team'),
    multiple_div_row(
        [ProfilePanel(**person) for person in team]
    )
)
Sitemaps
With about one line of code for every dynamic handler, a complete sitemap is built.
Redirects
Rebuilding an old site with legacy paths? No problem, Shark lets you add redirects to handlers and takes care of the rest.
Analytics
Adding google analytics is as simple as adding your tracking code to your settings.py file. All te javascript gets added for you automatically.
Webmaster Console files
When you add your site to Google's webmaster tools, you need to verify your site ownership. This is built into Shark. Simply add the verification codes for Google, Bing and Yandex to your settings.py and deploy.
Static pages
An upgraded version of flatpages. These are stored in the database and can be edited in the Admin interface. They are based on markdown, not html. Per page you can set the title, meta description, to include it in the sitemap, to create an AMP, etc.

Shark is in alpha, still to do:


Source Code

Pages on getshark.org have the source code for the page handler at the bottom of the page. If there's no code, it's a static page. Here's the code needed to render the current page:

class IndexHandler(PageHandler):
    route = '^$'

    def render_page(self, request):
        self.title = 'Shark - Build custom database driven web apps fast.'

        self.items.insert(0,
            Parallax('/static/web/img/background.jpg',
                    Container(Row([
                        Spacer(120),
                        Heading(Markdown('**The Shark Framework**'), style='margin-top: 0px;color:white;text-shadow: 2px 2px 3px rgba(0,0,0,0.6);', classes='text-center'),
                        Text(self.text('Description of project'), classes='text-center col-md-6 col-md-offset-3'),
                        Spacer(120)
                    ]))
            ))

        self += Row([
            Spacer(80),
            Paragraph(Text(self.text('Explanation'))),
            Feature(Icon('tachometer') + 'Fast Development', 'One of the key benefits of Shark is the speed of development. It\'s like LEGO for the web.', Spacer(70) + HighlightCode(self.text('Fast Code Example'), 'python')),
            Feature(Icon('power_off') + 'Robust Code', 'Because you write very little code and no html, css or javascript, you can\'t introduce many bugs.', Spacer(70) + HighlightCode(self.text('Robust Code Example'), 'python')),
            multiple_div_row(
            [
                Panel(
                    header='Sitemaps',
                    items='With about one line of code for every dynamic handler, a complete sitemap is built.'
                ),
                Panel(
                    header='Redirects',
                    items='Rebuilding an old site with legacy paths? No problem, Shark lets you add redirects to handlers and takes care of the rest.'
                ),
            ],
            [
                Panel(
                    header='Analytics',
                    items='Adding google analytics is as simple as adding your tracking code to your settings.py file. All te javascript gets added for you automatically.'
                ),
                Panel(
                    header='Webmaster Console files',
                    items='When you add your site to Google\'s webmaster tools, you need to verify your site ownership. This is built into Shark. Simply add the verification codes for Google, Bing and Yandex to your settings.py and deploy.'
                ),
                Panel(
                    header='Static pages',
                    items='An upgraded version of flatpages. These are stored in the database and can be edited in the Admin interface. They are based on markdown, not html. Per page you can set the title, meta description, to include it in the sitemap, to create an AMP, etc.'
                )
            ])
        ])

        self += Row([
            Heading('Shark is in alpha, still to do:', 3),
            Paragraph(Markdown(self.text('TODO list')))
        ])