TODO: Write a project description
TODO: Describe the installation process
Here's a shitty example of using AJAX in Django. Serialize your form before you pass it through the data variable. | |
<script type="text/javascript"> | |
$('#form-delete').on("submit", function(e) { | |
e.preventDefault() | |
// Use AJAX to delete the comment. | |
comment = $(this).attr('data-comment'); | |
$.ajax({ | |
type: 'POST', | |
url: $(this).attr('action'), |
virtualenv ~/virtualenvs/tix/ -p /usr/bin/python2.7 |
1. Create new SSH key in Access & Security. This will download a .pem file for you. | |
2. Launch the instance with the follow: | |
image: | |
Ubuntu 12.04 | |
service groups: | |
default | |
web-server | |
3. Associate floating ip. |
# Generate CSR | |
openssl req -nodes -newkey rsa:2048 -keyout websiteurl.com.key -out websiteurl.com.csr | |
# Fill this in | |
Country Name (2 letter code) [AU]:CA | |
State or Province Name (full name) [Some-State]:Alberta | |
Locality Name (eg, city) []:Edmonton | |
Organization Name (eg, company) [Internet Widgits Pty Ltd]:CompanyName | |
Organizational Unit Name (eg, section) []: | |
Common Name (e.g. server FQDN or YOUR name) []:websiteurl.com |
If you are doing a process that takes a long time and get a 504 timeout error. It may be because your nginx isnt configured to handle the long load time. | |
add: uwsgi_read_timeout 900; | |
to the nginx.conf file and it should work. | |
> brew install gettext | |
> brew link gettext |
### Solr Install ### | |
Install pysolr and django-haystack and set up django-haystack. Setup for haystack is pretty straight forward: | |
https://django-haystack.readthedocs.org/en/v1.2.7/tutorial.html | |
Make sure you follow the haystack instructions for the correct version of haystack that you installed, | |
as some of the setting variables are different depending on the version. | |
# SSH into the server that you want to install Solr on |
# Make VirtualEnv Command: | |
mkvirtualenv NAME_OF_VIRUTALENV -p LOCATION_OF_PYTHON_VERSION --no-site-packages | |
# Example: | |
mkvirtualenv testenv -p /usr/local/bin/python2.7 --no-site-packages |