Giter Site home page Giter Site logo

cookiecutter-wagtail's People

Contributors

alexgleason avatar bertrandbordage avatar davecranwell avatar gasman avatar kaedroho avatar parbhat avatar tomdyson avatar unixwitch 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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

cookiecutter-wagtail's Issues

RFC: A theme app

This one would mainly be of interest to FE devs (ping @davecranwell)

The idea is to add a new app to the template called "theme" which would contain:

  • All global static files
  • All base templates (base.html, 404.html, 500.html)
  • Any template tags needed by the theme (eg. a pagination_links inclusion tag)
  • (bonus) A component library and styleguide view for developers

Themes could be copied from existing sites which may make initial development easier. Not very experienced developers would definitely benefit from starting with a premade theme as well.

This would also solve the issue with all templates needing to be in an app in order to be translated.

Django 1.8 support

The following error is produced when running vagrant up after changing the requirements file to specify

Django==1.8.2
wagtail==1.0b2
==> default:   Applying home.0002_create_homepage...
==> default: Traceback (most recent call last):
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/models/query.py", line 405, in get_or_create
==> default:     return self.get(**lookup), False
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/models/query.py", line 334, in get
==> default:     self.model._meta.object_name
==> default: __fake__.DoesNotExist: ContentType matching query does not exist.
==> default:
==> default: During handling of the above exception, another exception occurred:
==> default:
==> default: Traceback (most recent call last):
==> default:   File "/vagrant/manage.py", line 10, in <module>
==> default:     execute_from_command_line(sys.argv)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
==> default:     utility.execute()
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/core/management/__init__.py", line 330, in execute
==> default:     self.fetch_command(subcommand).run_from_argv(self.argv)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/core/management/base.py", line 390, in run_from_argv
==> default:     self.execute(*args, **cmd_options)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/core/management/base.py", line 441, in execute
==> default:     output = self.handle(*args, **options)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 221, in handle
==> default:     executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/migrations/executor.py", line 110, in migrate
==> default:     self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/migrations/executor.py", line 147, in apply_migration
==> default:     state = migration.apply(state, schema_editor)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/migrations/migration.py", line 115, in apply
==> default:     operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/migrations/operations/special.py", line 183, in database_forwards
==> default:     self.code(from_state.apps, schema_editor)
==> default:   File "/vagrant/wagtailproj/home/migrations/0002_create_homepage.py", line 19, in create_homepage
==> default:     model='homepage', app_label='home', defaults={'name': 'Homepage'})
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/models/manager.py", line 127, in manager_method
==> default:     return getattr(self.get_queryset(), name)(*args, **kwargs)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/models/query.py", line 407, in get_or_create
==> default:     return self._create_object_from_params(lookup, params)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/models/query.py", line 439, in _create_object_from_params
==> default:     obj = self.create(**params)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/models/query.py", line 346, in create
==> default:     obj = self.model(**kwargs)
==> default:   File "/home/vagrant/.virtualenvs/wagtailproj/lib/python3.4/site-packages/django/db/models/base.py", line 480, in __init__
==> default:     raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])
==> default: TypeError: 'name' is an invalid keyword argument for this function

Database settings getting overwritten?

Just tried deploying a simple project based on this template to Dokku. Despite modifying settings.py to pick up the correct environment variables for DATABASES they seem to be getting overwritten somewhere:

Database

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': os.environ['DB_NAME'],
        # number of seconds database connections should persist for
        'CONN_MAX_AGE': 600,
        'USER': os.environ['DB_USER'],
        'HOST': os.environ['DB_HOST'],
        'PASSWORD': os.environ['DB_PASS'],
        'PORT': os.environ['DB_PORT'],

        # User, host and port can be configured by the PGUSER, PGHOST and
        # PGPORT environment variables (these get picked up by libpq).
    }
}

What is meant by picked up by libpq? Does this look like it should work with the following env variables:

DB_HOST 172.17.0.10 
DB_NAME aname 
DB_USER auser 
DB_PASS whatever 

If I start shell and print settings.DATABASES I get:

{'default': {'PORT': '', 'AUTOCOMMIT': True, 'ATOMIC_REQUESTS': False, 'TEST': {'CHARSET':     None, 'NAME': None, 'MIRROR': None, 'COLLATION': None}, 'USER': '', 'TIME_ZONE': 'UTC', 'NAME':    'icontractpromo', 'CONN_MAX_AGE': 600, 'PASSWORD': '', 'ENGINE':    'django.db.backends.postgresql_psycopg2', 'OPTIONS': {}, 'HOST': ''}}

However if I run the following snippet:

>>> for key in os.environ.keys():
    ...     print "%30s %s \n" % (key,os.environ[key])

I get all the environment variables returned as I'd expect. Just to be clear the postgres server is running in a seperate Docker container.

Am I missing something simple?

Thanks

404 <title>

On the request of @kaedroho I've added this as a replication of a ticket in the main Wagtail issue list.

As part of the core 404 and 500 pages.

The current template variables don't get completed for 404 or 500 pages as part of cores base.html file.

<title>{% block title %}{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}{% endblock %}{% block title_suffix %}{% endblock %}

Neither self.seo_title or self.title exist for 404s or 500s so something relevant should be output instead. I would suggest something containing the response code so that it's easier to track in GA but there is some argument for not presenting the complexity of response codes to users (even if it is just in the page title). Personally I don't agree with this argument.

I can't think of an argument for this to take place on a project by project basis. A developer could always change the content but something should get output as standard.

Licence

The repository doesn't contain any licence file. I have forked it to repurpose it for RocketPod's infrastructure but I want to make sure this is ok and that the code is permissively licenced (preferably BSD) to encourage others to do the same.

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.