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
#require 'capistrano/bundler' | |
before "deploy:restart", "deploy:migrate" | |
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
set :repo_url, '[email protected]:diogolmenezes/tripbag.git' | |
set :rvm_ruby_string, '[email protected]' | |
set :rvm_type, :system | |
set :deploy_to, "/srv/tripolis.com.br/www" |
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
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
set :repo_url, '[email protected]:diogolmenezes/tripbag.git' | |
set :rvm_ruby_string, 'ruby-2.1.1@#{host}' | |
set :rvm_type, :system | |
set :deploy_to, '/srv/#{host}/www' | |
set :user, 'root' | |
set :group, 'www-users' |
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
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
server "bebe.maeemacao.com.br", :app, :web, :db, :primary => true | |
set :server_web, "sasha.minestore.me" | |
set :application, "tripolis.com.br" | |
set :domain, 'tripolis.com.br' | |
set :host, 'tripolis.com.br' |
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 | |
urlpatterns = patterns('', | |
url('^galerias/$', | |
active_generic_view, | |
{'view': object_list, 'model': MediaCenter, 'paginate_by': 20}, | |
name='webmedia_mediacenter_list'), | |
url(r'^(?P<category_slug>[-\w]+)/galerias/$', 'mediacenter_category_list', | |
name='webmedia_mediacenters_category_list'), |
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
site = Site.objects.get_current() | |
absolute_url = 'http://%s%s' % (site.domain, | |
instance.get_absolute_url()) | |
instance.short_url = vamu_url_shortening(absolute_url) | |
def vamu_url_shortening(url): | |
url = urllib2.quote(url, safe='') | |
vamu_api = 'http://va.mu/api/create/?url=%s' % (url) | |
response = urllib2.urlopen(vamu_api).read() |