pushing content to cell phones - django

I am working on a photo site and one of more active users asked about pushing content to cell phones. The site is built on django, and I was wondering if anyone knows a good way of allowing users to download and store content (images) on their cell phones?
As a side question... is it possible to accept payment for the content via the cell phone or would that have to take place on the site?

The best way to serve content to a mobile user would be to forward them to a mobile specific site. A lot of places do this by forwarding the user to http://m.mydomain.com/. You can tell if they're using a cellphone by checking against their UserAgent string as Harold said. Find more at: Change Django Templates Based on User-Agent
In terms of downloading, this is pretty phone dependant. On my iphone, for instance, I don't know that I can save images directly from the internet. (This could just be my ignorance, however). I think you're going to run into a lot of discrepencies on the browsers between different mobile devices. How many offer photo downloads vs. not, etc.
For payment, I would suggest keeping it in browser. There is SOO much that could go crazy on a cell phone and money isn't one of those places where I like to take risk. That being said, you could likely look into some sort of sms micro payment system (sorry, I don't have any recommendations) or look at partnerships with carriers such as Verison. Beyond that, I'd say keep it in the App.
Hope it helps.

Check to see if the User Agent of the phone(s) you wish to support is in request.META['HTTP_USER_AGENT']. If so, render mobile friendly templates.

Related

How to customize mobile device detector?

I have a customize request from my client in sitecore mobile module.
I want to be on full view site from my mobile on Career page, i am able to do it but any of the link inside career page with having mobile layout in presentation detail is taking that page again to mobile device.
Can we make any customization that maintain the device in cookies so that it keep user on full view site after coming to career page.
Is there any setting we can do in pipeline or session. I just want to be throughout in full view site after coming on career page and no going back to mobile layout. Kindly suggest.
Yes, you can do exactly that. You'd need to update the rule to detect the various devices (which I'm guessing you already have). You can then create a custom condition to check if cookies have been set for the full site(does not need to be a cookie of course, but that'd be the easiest way).
You can find the existing Conditions and Actions here in the path /sitecore/system/Settings/Rules.
To create custom conditions and actions, please read the following article on SitecoreInsight.com
After creating your custom condition, go into your device item again and update the Rule there to only switch to that device when that cookie has not been set.
[edit]
Come to think about it, it might be possible to have your 'go to full site' link appended with a querystring sc_device={GUID of device}. I'm not sure what would take precedence here, the 51degrees rules or Sitecore's cookies... Worth a try though :-)

Methods for sending dynamic content in Django apps

I'm quite new to all of this, so I apologize if the language I'm using isn't indicative of what I'm describing.
I am developing a Django app which my company will use to monitor bids at auctions which it sends out to various banks. I am at the stage now where the clients see the auction and its contents on one page, and we see pretty much the same thing on a different page. What I want to happen is for the clients to fill in their bids on all the things they want, hit "submit", whereupon on our (the admin) page, a new column pops into existence with the name of the bank and their bids on each item.
I don't think I can do this in jQuery. Do I have to use AJAX? PHP? Are all of these valid methods? I really don't know. Any help would be greatly appreciated.
I use PHP and Django. But the easiest way to build like that is with Django+Ajax.

unique user on mobile site

I am developing a django web site to be used with mobile phones (not just smartphones), only in public places that have wireless (malls, resteraunts, etc.).
How can I follow unique users on my site? I want to mesure time spent, visit depth and so on BUT most of them will share the same IP.
EDIT: I will clearify myself: The site is to be used (without logging in) only in places with wireless. Smartphones will probably use the wireless, and non-smartphones will use their cellolar network. I'm looking for best practice to follow them uniqly regardless of the device/network.
Use the session ID. Don't track users if they're not logged in, track sessions.
Just post a cookie on the first visit, then update it regularly and keep track of it for your desired metrics. It's not perfect, but nothing is in this space.

Sending Newsletters from Django

I am seeking advice from someone with experience integrating django and newsletters.
I need to send newsletters from my django app. I see that there are a couple of packages that already do this such as 'pennyblack' and 'emencia'. Does anyone have experience with these? Which of these is the most versatile and easy to use? My users want to add their own content to the news letters with topic, and article. News letters generally have 3 articles with a couple of photos. I also want the newsletter to print nicely as both html and pdf formats. Any working expamples I could toy with before I dive into the code?
Thanks!!
You can send html email messages directly from django with a few lines of python code, as in this snippet: http://www.djangofoo.com/250/sending-html-email. Or you can use an email sending module (I like django-messages - it allows for html and plaintext variants and gives you a message queue). Of course, that doesn't help you manage the newsletter, so you'd have to do that yourself and render an html template the same way you do with any webpage. I assume you've already checked google for newsletter-specific django modules with more features, but I don't know of any.
However, you probably don't want to send a newsletter yourself through django (more importantly, from your own production server). For one thing, if it's going to a lot of people, you don't want it to use all of your bandwidth and make your site sluggish while a huge queue of emails is sent. But more importantly, it's easy to get your server blacklisted by spam filters if you're not sending from a known, reputable domain (if you're paying for hosting it might be less of an issue, but you should check with your hosting provider).
IMO, your best bet is to use a stand-alone email newsletter service like MailChimp or Cheetah Mail. I've used and highly recommend MailChimp for a small to medium number of recipients, but I imagine there are a bunch of others that do that same thing. It makes organizing your message campaigns and recipient lists easy with hooks to do things like add a new user on your site to a recipient list. I'm sure you could also figure out a way to get your user-submitted content into the newsletter from django.
Hope that helps.
check this out. A better solution for you is django-newsletter

Checking a visitor's geographical location in a Django app

I am making a multilingual Django website. I want the site to check from which country the user is accessing the website, and according to that decide which language to use.
What would be a good tool to use for that?
When one of your regular users travels with his laptop to another country and access your site, can't understand a thing and can't change the language, that would suck.
I wouldn't recommend checking for the country (by IP probably). Instead go for the Accept-Language header the browser of the client sends. You should still leave the option to let the user change the language manually (and store the preference in the session for example).
Another option is going wikipedia style and setting the language by URL (en.example.com, de.example.com or example.com/en/, example.com/de/).
I had a similar problem on my site, and I used the MaxMind IP free database as a model and it's called as middleware.
So as the user goes to the site, the middleware detects his country by his IP and redirects him to the right language
There is more than one way to do this, but a good solution is to use a geotargeting suite. Depending on your budget, there are free and paid solutions. I've used Digital Element's product (NetAcuity) for this type of thing in the past, and their solutions are top-notch. They provide both a in house server solution (for high-performance applications. ~30k queries per second) and a web-service solution for more typical applications. They have API's in numerous languages including Python that you could use within Django. They will allow you to query for information such as geo location, primary and secondary language, connection-speed, etc. all based on the users IP address. Geo accuracy at the the country level is highly accurate based on my experience.
A free solution to also consider is MaxMind, though I'm not as familiar with their product.