AlpineJS Javascript Alpine Expression Error: Cannot read properties of undefined - Elvis Operator
<span x-text="object.context.vencedor?.fornecedor?.shortuuid"></span>Elvis Operator
| from django.db.models import TextChoices | |
| from django.utils.translation import gettext | |
| class TipoPessoaChoice(TextChoices): | |
| F = "F", gettext("Pessoa Fisica") | |
| J = "J", gettext("Pessoa Juridica") |
| <div class="fixed bottom-4 right-8 border border-gray-200 rounded-lg shadow-md"> | |
| <div class="container mx-auto"> | |
| <!-- Chat container --> | |
| <div class="container mx-auto"> | |
| <!-- Flex container --> | |
| <div class="flex"> | |
| <!-- First div --> | |
| <div class="w-1/2 p-4"> | |
| <!-- lista de contatos --> | |
| <div class="container mx-auto p-4"> |
| class MyModel(models.Model): | |
| # Como gerar um dicionário serializável de um objeto automaticamente com serializable_value | |
| # https://stackoverflow.com/a/39384659/802542 | |
| ... | |
| def to_dict(self, exclude=[]): | |
| # https://stackoverflow.com/a/39384659/802542 | |
| tree = {} | |
| for field in self._meta.fields: | |
| if field.name in exclude: |
AlpineJS Javascript Alpine Expression Error: Cannot read properties of undefined - Elvis Operator
<span x-text="object.context.vencedor?.fornecedor?.shortuuid"></span>Elvis Operator
| class Sprint(UuidModel, TimeStampedModel): | |
| title = models.CharField(max_length=100, null=True, blank=True) | |
| project = models.ForeignKey( | |
| Project, | |
| on_delete=models.CASCADE, | |
| related_name='sprints', | |
| ) | |
| def get_issues(self): | |
| return self.issue_set.all() |
| <html class=""> | |
| <head> | |
| <!-- A diferença é que o JS precisa ser carregado antes. --> | |
| <script src="{% static 'js/switcher.js' %}"></script> | |
| </head> | |
| <body> | |
| <div id="switcher" class="dark-mode-switcher cursor-pointer shadow-md fixed bottom-0 right-0 box dark:bg-dark-2 border rounded-full w-40 h-12 flex items-center justify-center z-50 mb-10 mr-10"> | |
| <!-- classes do TailwindCSS --> |
| find backend/core/templates -type f -name "*_*" -exec bash -c 'mv "$0" "${0//_/-}"' {} \; | |
| find backend/core/templates -type f -name "*_light_*" -exec bash -c 'mv "$0" "${0//_light_/_}"' {} \; |
| ssh-keygen -t rsa -b 4096 -C "regis********@****.com" | |
| # id_rsa.pub | |
| eval "$(ssh-agent -s)" | |
| ssh-add ~/.ssh/id_rsa | |
| # copy | |
| xclip -sel clip < ~/.ssh/id_rsa.pub |
Como debugar erro de conexão SSH
https://www.kisphp.com/linux/configure-ssh-for-multiple-hosts