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
--- a/certification/forms.py | |
+++ b/certification/forms.py | |
@@ -309,3 +309,47 @@ class BaseCertRecipeIngredientFormSet(BaseFormSet): | |
+class CertRecipeAttachmentForm(forms.ModelForm): | |
+ # id = forms.CharField(label=_("id"), max_length=254, required=False, widget=forms.HiddenInput()) | |
+ type = forms.ChoiceField(label=_("Attachment type"), choices=[('', '----')] + RECIPE_ATTACHMENT_TYPE_CHOICES, | |
+ required=True, | |
+ error_messages={'required': "Please select type."}) | |
+ file = ExtFileField(label=_("File"), required=False, | |
+ ext_whitelist=['.pdf', '.doc', '.docx', '.jpg', '.png', '.gif', '.eps'], |
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
# properly install redis follow official doc on centos | |
# https://redis.io/topics/quickstart#installing-redis-more-properly | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
sudo cp src/redis-server /usr/local/bin/ | |
sudo cp src/redis-cli /usr/local/bin/ |
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
sudo timedatectl set-timezone Australia/Sydney | |
sudo yum -y update | |
sudo yum -y install gcc gcc-c++ kernel-devel libxml++-devel libxml2-devel python-devel libxslt-devel libffi-devel openssl-devel mysql-devel | |
sudo yun -y install ImageMagick-devel libcurl-devel wget zip git bash-completion bash-completion-extras curl enchant | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
cat ~/.ssh/id_rsa.pub | |
sudo vi /etc/sysconfig/network | |
sudo echo 'HOSTNAME=luotao.net' >> /etc/sysconfig/network |
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
#!/bin/sh | |
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner | |
$cli set remap.fn_fkeys_to_consumer_f10 1 | |
/bin/echo -n . | |
$cli set private.holdingEscape_to_Control-L 1 | |
/bin/echo -n . | |
$cli set switch_input_language 1 | |
/bin/echo -n . |
NewerOlder