This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Digialocean | |
| Postgres | |
| To dump: pg_dump -h localhost -U USERNAME DATABASENMAE > /home/NAME/DATABASENAME.sql | |
| To import: psql -h localhost -U username databasename < databasename.sql | |
| Python | |
| python3 -m venv /path/to/new/virtual/environment | |
| find . -name '*.pyc' -delete - gets rid of old .pyc files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| root: true, | |
| env: { | |
| browser: true, | |
| node: true | |
| }, | |
| parserOptions: { | |
| parser: 'babel-eslint' | |
| }, | |
| extends: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.utils.translation import gettext_lazy as _ | |
| from wagtail.images.formats import Format, register_image_format, unregister_image_format | |
| unregister_image_format('fullwidth') | |
| register_image_format(Format('fullwidth', _('Full width'), 'w-100 rounded-lg', 'width-800')) | |
| unregister_image_format('left') | |
| register_image_format(Format('left', _('Left-aligned'), 'w-1/2 float-left rounded-lg', 'width-800')) | |
| unregister_image_format('right') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AddImage(LoginRequiredMixin, CreateView): | |
| """ | |
| adds a image | |
| """ | |
| form_class = ImageForm | |
| model = Image | |
| def get_template_names(self): | |
| if self.request.htmx: |
OlderNewer