General Options
Theme Options
Security Options
SEO Options
$ pip install django-storages-reduxAlso you must install Apache Libcloud:
$ pip install apache-libcloudAnd enable from settings.py by adding following lines:
DEFAULT_FILE_STORAGE = 'storages.backends.apache_libcloud.LibCloudStorage'If you don't create bucket, you can create from shell:
DEFAULT_LIBCLOUD_PROVIDER = 'google_storage'
LIBCLOUD_PROVIDERS = {
'google_storage': {
'type': 'libcloud.storage.types.Provider.GOOGLE_STORAGE',
'user': 'yourcloudstorageapikey:)',
'key': 'yourcloudstorageapisecretkey:)',
'bucket': 'default-bucket-name',
}
}
$ ./manage.py shell
$ from storages.backends.apache_libcloud import LibCloudStorage
$ LibCloudStorage('google_storage').driver.create_container('default-bucket-name')
$ brew install nginxDefault Nginx server name is localhost with 8080 port. So you can see default Nginx page by entering http://localhost:8080 address. Let's change something:
$ vim /usr/local/etc/nginx/nginx.confYou'll see default server configuration like this:
server { listen 8080; server_name locahost;Change them with what you want and save the file. To reload Nginx configuration you should restart Nginx by calling these:
## other things}
$ sudo nginx -s stop$ sudo nginxIncluding multi server defination from different files
$ include /usr/local/etc/nginx/conf.d/*.conf;Now your can create symlinks to these directories. Of course, don't forget to restart Nginx!
$ include /usr/local/etc/nginx/sites-enabled/*.conf;
[App 1]Ancak siz bu goruntuyu istemiyor, asagidaki gibi bir goruntu istiyorsunuz:
- Model 1
- Model 2
[App 2]
- Model 3
[App 1]Hosgeldiniz! Yapilmasi gereken islem, App 2 altinda bulunan Model 3'un Meta sinifinda o modelin app'inin aslinda App 1 oldugunu soylemek. Onu da boyle yapiyoruz:
- Model 1
- Model 2
- Model 3
2014/07/31 08:08:39 [error] 3536#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 95.95.95.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"or this:
2014/07/31 08:25:07 [crit] 3644#0: *23 connect() to unix:/tmp/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 95.95.95.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php5-fpm.sock:", host: "localhost"You have probably setted wrong or passive TCP or socket address. You can learn PHP's TCP or socket addsress from /etc/php5/fpm/pool.d/www.conf file. Check lines that starts with these:
listen = 127.0.0.1:9000 ;listen = /tmp/php5-fpm.sockDestroy ; char from starting, and have fun! Don't forget to restart your PHP or your another service -- like this $ service php5-fpm restart!