git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
1. Allow the usage of custom virtual hosts. Open the httpd.conf | |
sudo gedit /opt/lampp/etc/httpd.conf | |
2. Uncomment the line bellow | |
# Virtual hosts | |
Include etc/extra/httpd-vhosts.conf | |
3. Create a custom domain in the hosts file of your system |
1. Define this in your setting.py | |
DEBUG = False | |
STATIC_ROOT = '/opt/lampp/htdocs/static/' | |
2. Run | |
python manage.py collectstatic | |
3. Create a proxy -> sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf |
#!/bin/bash | |
####################################################################### | |
# | |
# Solus OS system setup | |
# | |
####################################################################### | |
# Go into a temp work directory | |
mkdir ~/tmp-installer |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
pacman -S mariadb | |
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql //注意这个datadir,很重要,按照默认操作 | |
systemctl enable mysqld | |
systemctl start mysqld | |
mysql_secure_installation |
autocomplete="off"
onto <form>
element;<input>
with autocomplete="false"
as a first children element of the form.<form autocomplete="off" method="post" action="">
<input autocomplete="false" name="hidden" type="text" style="display:none;">
...
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
'mail_admins': { | |
'level': 'ERROR', | |
'class': 'django.utils.log.AdminEmailHandler' | |
}, | |
'null': { | |
'level':'DEBUG', |
class CategoryListFilter(SimpleListFilter): | |
# USAGE | |
# In your admin class, pass trhe filter class as tuple for the list_filter attribute: | |
# | |
# list_filter = (CategoryListFilter,) | |
# Human-readable title which will be displayed in the | |
# right admin sidebar just above the filter options. |
#!/bin/bash | |
DBUSER="root"; | |
DBPASS=""; | |
DBHOST="localhost"; | |
DB_OLD=mydatabase | |
DB_NEW=clone_mydatabase | |
DBCONN="--host=${DBHOST} --user=${DBUSER} --password=${DBPASS}"; |