Site model adjustments

I don't think this would be an issue. You should probably take secure connections into account though:
```port = '443' if request.is_secure() else '80'```