Amazon S3 Website CNAME

While trying to create an S3-hosted static website I was trying to configure my domain to point to the S3 with a CNAME record on my DNS records for the domain.

The Amazon documentation mistakenly tells you to setup your CNAME to point to something like this:

#this is wrong!
 
my.domain.com CNAME my.domain.com.s3.amazonaws.com.
 
http://my.domain.com/index.html # will work
 
http://my.domain.com/ # will not work

This configuration will not work if you want directories to serve index.html by default. You may notice that if you type the complete URL you will get an S3 “Access Denied” message.

For your bucket, go to: Properties->Website
 
Endpoint: http://my.domain.com.s3-website-us-east-1.amazonaws.com/
You need: s3-website-us-east-1.amazonaws.com

Now you can configure your DNS settings.

# the proper configuration
 
my.domain.com CNAME s3-website-us-east-1.amazonaws.com.
 
http://my.domain.com/index.html # will work
 
http://my.domain.com/ # will work

Button labels for checkout

Taking an inventory of submit button labels during the purchase process.

Amazon
* Add to cart
* Proceed to checkout
* Continue (3x)
* Place your order

Half.com
* Buy
* Proceed to Checkout
* Use this Address
* Use this Card
* Place my order!

Sears.com
* Add to Cart
* View Cart and Checkout / Continue Shopping
* Proceed to Checkout (or PayPal button)

Forrst.com
* UPGRADE NOW $5/month - $49/year
* Buy Supporter Account

Usabilityhub.com
* upgrade plan
* change plan
* confirm

Insert html django contrib messages

I wanted to use raw HTML in certain invocations of Django’s Messages architecture such as in messages.success.

When sending your message:

messages.success(request, mark_safe("""Thanks for your purchase. 
     Your <a href="%s">Account &gt; Payment</a>""" 
     % urlresolvers.reverse(‘account_payment_detail’, kwargs = {‘id’:payment.id})
       ), extra_tags=‘html’)

Modify your Django snippet to skip the web-safe encoding:

{% if ‘html’ in message.tags %}
  {{ message|safe }}
{% else %}
  {{ message }}
{% endif %}
Syndicate content