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
| # urls.py (not complete by any means) | |
| url(r'^$', 'display_lead_list', name='lead_list'), | |
| url(r'^(?P<id>\d+)/edit/$', 'lead_edit', name='lead_edit'), | |
| # views.py | |
| @login_required | |
| def display_lead_list(request, template_name='lead/lead_list.html'): | |
| LeadFormSet = modelformset_factory(Lead) |
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
| try: | |
| import settings_dev | |
| except ImportError: | |
| pass |
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
| case = case_form.save(commit=False) | |
| case.created_by = request.user | |
| case.last_modified_by = request.user | |
| case.assigned_by = request.user | |
| case.venue = venue | |
| case.save() |
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
| # from http://pastie.org/2444032 | |
| case $operatingsystem { | |
| "Ubuntu": { | |
| case $lsbdistrelease { | |
| "10.04": { $service_name = "postgresql-${version}", } | |
| "10.10": { $service_name = "postgresql", } | |
| } | |
| } | |
| } |
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
| class postgres::params { | |
| $service_name = $operatingsystem ? { | |
| "Ubuntu" => $lsbdistrelease { | |
| "10.04" => "postgresql-${version}", | |
| "10.10", "11.04" => "postgresql", | |
| }, | |
| default => "postgresql", | |
| } | |
| } |
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
| server { | |
| listen 80; | |
| server_name example.com; | |
| error_log /var/log/nginx/error.log; | |
| access_log /var/log/nginx/access.log; | |
| # Don't proxy static files like robots.txt and favicon.ico. | |
| location ~ ^/(favicon.ico|robots.txt|sitemap.xml)$ { | |
| alias /home/deploy/sites/.../public/$1; | |
| } |
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
| import os | |
| PROJECT_PATH = os.path.dirname(__file__) | |
| TEMPLATE_DIRS = ( | |
| os.path.join(PROJECT_PATH, 'templates'), | |
| ) |
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 rabbitmqctl add_user myusername mypassword | |
| $ sudo rabbitmqctl add_vhost myvhost | |
| $ sudo rabbitmqctl set_permissions -p myvhost myusername "" ".*" ".*" |
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
| FB.Event.subscribe('edge.create', function(response) { | |
| window.location.reload(); | |
| }); |
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
| # deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted | |
| # deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted | |
| # deb http://security.ubuntu.com/ubuntu lucid-security main restricted | |
| # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
| # newer versions of the distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted | |
| deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted | |
| ## Major bug fix updates produced after the final release of the |
NewerOlder