Giter Club home page Giter Club logo

next.filmfest.by's Introduction

next.filmfest.by

Travis GitHub Actions Netlify static preview

Welcome to the workplace for upcoming website for Cinema Perpetuum Mobile short film festival. Our goal is to gracefully replace the existing version with new code feature by feature.

Join our chat https://riot.im/app/#/room/#cpm-dev:matrix.org for questions.

The goal of new website version is to create a user-friendly admin panel for festival volunteers. The feature set is taken from the experience we've gathered during previous festivals.

How to join development and be a part of CPM movement

We welcome all contributors and enhancements that help to make this tool for festival to be awesome. Feel free to jump in and help with things to your liking.

Your freedom is your creativity - being it good design, some bits of code, or another contribution that helps to push the movement. Making a film festival together is a great thing on its own, but to make it worth your time even more we've choosen UNLICENSE to make sure that you can reuse the bits we've created together without restrictions and limitations - being it your commercial projects or open source. If you wanted to learn about programming or creating websites to get a job - that might be your chance.

For experienced, the most straightforward areas to contribute are:

  • backend written in Django / Wagtail
  • frontend - a lot can be done here
  • design / styling
  • data migration (organize data related to previous festivals in JSON)

Communication

Technology stack

Programming:
- Wagtail
  - Django
    - Python
      - pip/tox/virtualenv
    - HTML5/CSS
    - JavaScript

Deployment:
- Docker Compose
  - Docker
    - Digital Ocean
      - SSH
      - HAProxy
      - PostgreSQL

Development process

We use github for development. In order to start one needs to fork and clone the repository:

  1. fork kinaklub/next.filmfest.by using github UI

  2. clone forked repository to one's local machine:

    git clone [email protected]:yourusername/next.filmfest.by.git
    
  3. add upstream repository as a remote:

    git remote add upstream [email protected]:kinaklub/next.filmfest.by.git
    

Before starting working on next improvement one usually does the following:

  1. switch to local master:

    git checkout master
    
  2. pull recent changes from upstream master:

    git pull upstream master
    
  3. create a new feature branch:

    git checkout -b branch_name
    
  4. create corresponding branch in one's fork:

    git push -u origin branch_name
    

After commiting everything to the feature branch one usually does the following:

  1. push the changes to one's fork:

    git push
    
  2. create a pull request using github UI.

PR review process:

  1. we use Travis CI for launching tests on PRs

  2. we don't merge PRs to master until tests are green

  3. we require the PRs to be reviewed by at least one team member

  4. reviewer adds comment "LGTM" when one think the PR is good to be merged

  5. PRs are usually merged by the authors

Development environment

  1. Install Docker and docker-compose

  2. Don't forget to set DOCKER_HOST environmental variable or add yourself to group docker

  3. Start web contatiner:

    docker-compose up web
    
  4. Give postgres 20-30 seconds to initialize

  5. Visit http://127.0.0.1:8000/ in your web browser, superuser admin:111111 should have already been created.

Recreating development environment

If one wants to recreate their development environment from scratch and one doesn't care about the existing data in database, one needs to:

  1. remove all the containers, purge all the data:

    docker-compose down
    
  2. rebuild images

    docker-compose build
    
  3. use quickstart guide above for setting up the development environment

Testing code

The command below is usually enough for local testing:

docker-compose run web test

If Python dependencies have changed recently, one might need to add paramter -r once:

docker-compose run web test -r

next.filmfest.by's People

Contributors

abitrolly avatar davojta avatar hanna-razhentsova avatar nasedil avatar staaas avatar stas-dr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

staaas abitrolly

next.filmfest.by's Issues

django.db.utils.IntegrityError: NOT NULL constraint failed: wagtailimages_image.width

I can't recreate local development environment after 0005_add_jury_data migration. Might be SQLite issue.

...
  Applying results.0004_filmpage... OK
  Applying results.0005_add_jury_data...Traceback (most recent call last):
  ...
  File "...django\db\migrations\migration.py", line 123, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "...django\db\migrations\operations\special.py", line 183, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "C:\__droid\next.filmfest.by\results\migrations\0005_add_jury_data.py", line 74, in add_jury_member_pages
    photo.file.save(name=item['photo'], content=File(photo_file))
  File "...django\db\models\fields\files.py", line 111, in save
    self.instance.save()
  File "...django\db\models\base.py", line 708, in save
    force_update=force_update, update_fields=update_fields)
  File "...django\db\models\base.py", line 736, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "...django\db\models\base.py", line 820, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "...django\db\models\base.py", line 859, in _do_insert
    using=using, raw=raw)
  File "...django\db\models\manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "...django\db\models\query.py", line 1039, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "...django\db\models\sql\compiler.py", line 1060, in execute_sql
    cursor.execute(sql, params)
  File "...django\db\backends\utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "...django\db\backends\utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "...django\db\utils.py", line 95, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "...django\db\backends\utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "...django\db\backends\sqlite3\base.py", line 323, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: NOT NULL constraint failed: wagtailimages_image.width

Update styles for active menu item

Active menu item (marked with class="active") doesn't seem to be styled properly.

We need to update the styles so active menu items look good.

Looks like this problem also exists on filmfest.by

Check why tests didn't catch problem with the migrations fixed in #6

We had invalid migrations configuration. But this problem has never been caught by tests in travis.

Steps to reproduce on a clean environment

  • docker compose up -d web
  • wait 30 seconds until postgres initializes
  • docker compose run web migrate
$ docker-compose run web migrate
Starting nextfilmfestby_data_1
/app/lib/python2.7/site-packages/django/utils/six.py:808: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.
  return meta(name, bases, d)

/app/src/filmfest/urls.py:14: RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got search.views.search). Pass the callable instead.
  url(r'^search/$', 'search.views.search', name='search'),  # noqa

/app/src/filmfest/urls.py:15: RemovedInDjango110Warning: Calling i18n_patterns() with the `prefix` argument and with tuples instead of django.conf.urls.url() instances is deprecated and will no longer work in Django 1.10. Use a list of django.conf.urls.url() instances instead.
  url(r'', include(wagtail_urls)),

/app/lib/python2.7/site-packages/django/conf/urls/i18n.py:25: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.
  pattern_list = patterns(prefix, *args)

Operations to perform:
  Apply all migrations: wagtailusers, wagtailembeds, wagtailadmin, sessions, admin, wagtailcore, results, auth, contenttypes, cpm_generic, taggit, wagtailsearch, home, wagtailforms, wagtailredirects, wagtailimages
Running migrations:
  Rendering model states... DONE
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying wagtailcore.0001_squashed_0016_change_page_url_path_to_text_field... OK
  Applying wagtailcore.0017_change_edit_page_permission_description... OK
  Applying wagtailcore.0018_pagerevision_submitted_for_moderation_index... OK
  Applying wagtailcore.0019_verbose_names_cleanup... OK
  Applying cpm_generic.0001_initial... OK
  Applying wagtailcore.0020_add_index_on_page_first_published_at... OK
  Applying wagtailcore.0021_capitalizeverbose... OK
  Applying wagtailcore.0022_add_site_name... OK
  Applying wagtailcore.0023_alter_page_revision_on_delete_behaviour... OK
  Applying wagtailcore.0024_collection... OK
  Applying wagtailcore.0025_collection_initial_data... OK
  Applying wagtailcore.0026_group_collection_permission... OK
  Applying wagtailcore.0027_fix_collection_path_collation... OK
  Applying wagtailcore.0024_alter_page_content_type_on_delete_behaviour... OK
  Applying wagtailcore.0028_merge... OK
  Applying home.0001_initial... OK
  Applying home.0002_create_homepage... OK
  Applying taggit.0001_initial... OK
  Applying taggit.0002_auto_20150616_2121... OK
  Applying wagtailimages.0001_initial... OK
  Applying wagtailimages.0002_initial_data... OK
  Applying wagtailimages.0003_fix_focal_point_fields... OK
  Applying wagtailimages.0004_make_focal_point_key_not_nullable... OK
  Applying wagtailimages.0005_make_filter_spec_unique... OK
  Applying wagtailimages.0006_add_verbose_names... OK
  Applying wagtailimages.0007_image_file_size... OK
  Applying wagtailimages.0008_image_created_at_index... OK
  Applying wagtailimages.0009_capitalizeverbose... OK
  Applying wagtailimages.0010_change_on_delete_behaviour... OK
  Applying results.0001_initial... OK
  Applying results.0002_resultspage_resultsrelatedjurymember... OK
  Applying results.0003_jurymemberpage_country... OK
  Applying results.0004_filmpage...Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/app/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 200, in handle
    executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File "/app/lib/python2.7/site-packages/django/db/migrations/executor.py", line 92, in migrate
    self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/app/lib/python2.7/site-packages/django/db/migrations/executor.py", line 121, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/app/lib/python2.7/site-packages/django/db/migrations/executor.py", line 198, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/app/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 90, in __exit__
    self.execute(sql)
  File "/app/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 110, in execute
    cursor.execute(sql, params)
  File "/app/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/app/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/app/lib/python2.7/site-packages/django/db/utils.py", line 95, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/app/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "submissions_submission" does not exist

Security updates

I am getting security email about this project each week and have no idea how to deal with them.

I probably want to rename the data dir to be _data to stand out from the rest of the website, as it holds the most value in the repository right now.

Then a quick status update on http://filmfest.by would be great, and the role https://next.filmfest.by

If the next web is still actual, then perhaps pin a most pressing issue to the repo - like if we have something horrendously broken right now. And then finally do some quick iterations over the security issues.

Why HAProxy

From #83 (comment):

@abitrolly I have plans to get rid of nginx and replace it with haproxy
let's close this pr

@nott I remember we were discussing the issue, but don't remember the outcome. Two problems with these plans:

  1. Neither me, not @davojta have hands-on experience with HAProxy (@davojta, correct me if I wrong), but I tuned Nginx more than once

So to protect project from you being hit by a bus (something that happens to me weekly), we'll have to learn HAProxy. Now there is already a big stack of technologies we've built upon, and until we find time to learn new kata, this just adds to our debt of competence (where only only one person possesses know-how).

  1. There is no arguments technical explanation why HAProxy is better alternative for us to already working Nginx

I understand that all of us constantly need new toys to play, and that is keep us motivated, creative, and keeps open source fun. But I find it less fun when Google chooses NGINX and we abandon it without any sound argument about a better alternative.

So I hope you agree to list your arguments once again here, or give a public talk about it on Linux meetup, and we can invoke a power of VideoBro to make a sound reference. =)

Organize CSS and document them

It is unclear how our site is stylized.

Does it use CSS frameworks (LESS, SASS)?
Where to place user styles?

User story - I need to add style for active item in the main menu.

Develop html markup for news page

  • news should contain title as link
  • news should contain date
  • news should contain category
  • news should contain social links
  • news should contain images (or stub image if article without image)
  • news should contain show more link if news is bigger then 2 sentences

See http://worldoftanks.com/ for reference

need translation for films 2015

`
[ { id: '1178', langs: [ 'en' ] },
{ id: '1248', langs: [ 'en' ] },
{ id: '1405', langs: [ 'en' ] },
{ id: '1407', langs: [ 'en' ] },
{ id: '1585', langs: [ 'en' ] },
{ id: '1875', langs: [ 'en' ] } ]

`

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.