Fixes on deployment
This commit is contained in:
parent
f620feae08
commit
440153e42e
|
@ -21,7 +21,7 @@ If you are planing to do some development you may want to consider doing it unde
|
||||||
|
|
||||||
3. Deploy django-orchestra development environment
|
3. Deploy django-orchestra development environment
|
||||||
```bash
|
```bash
|
||||||
bash <( curl -L https://git.io/deploy-orchestra ) --dev
|
bash <( curl -L http://git.io/orchestra-deploy ) --dev
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Nginx should be serving on port 80, but Django's development server can be used as well:
|
3. Nginx should be serving on port 80, but Django's development server can be used as well:
|
||||||
|
@ -33,5 +33,5 @@ If you are planing to do some development you may want to consider doing it unde
|
||||||
|
|
||||||
5. To upgrade to current master just re-run the deploy script
|
5. To upgrade to current master just re-run the deploy script
|
||||||
```bash
|
```bash
|
||||||
bash <( curl -L https://git.io/deploy-orchestra ) --dev
|
bash <( curl -L http://git.io/orchestra-deploy ) --dev
|
||||||
```
|
```
|
||||||
|
|
|
@ -9,6 +9,7 @@ from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.core.urlresolvers import reverse, NoReverseMatch
|
from django.core.urlresolvers import reverse, NoReverseMatch
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
|
from django.utils import timezone
|
||||||
from django.utils.html import escape
|
from django.utils.html import escape
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
|
@ -141,16 +142,15 @@ def admin_colored(*args, **kwargs):
|
||||||
@admin_field
|
@admin_field
|
||||||
def admin_date(*args, **kwargs):
|
def admin_date(*args, **kwargs):
|
||||||
instance = args[-1]
|
instance = args[-1]
|
||||||
value = get_field_value(instance, kwargs['field'])
|
date = get_field_value(instance, kwargs['field'])
|
||||||
if not value:
|
if not date:
|
||||||
return kwargs.get('default', '')
|
return kwargs.get('default', '')
|
||||||
if isinstance(value, datetime.datetime):
|
if isinstance(date, datetime.datetime):
|
||||||
natural = humanize.naturaldatetime(value)
|
natural = humanize.naturaldatetime(date)
|
||||||
else:
|
else:
|
||||||
natural = humanize.naturaldate(value)
|
natural = humanize.naturaldate(date)
|
||||||
return '<span title="{0}">{1}</span>'.format(
|
local = timezone.localtime(date).strftime("%Y-%m-%d %H:%M:%S %Z")
|
||||||
escape(str(value)), escape(natural),
|
return '<span title="{0}">{1}</span>'.format(local, escape(natural))
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_object_from_url(modeladmin, request):
|
def get_object_from_url(modeladmin, request):
|
||||||
|
|
|
@ -82,6 +82,7 @@ def naturaldatetime(date, show_seconds=False):
|
||||||
).format(hours=hours, ago=ago)
|
).format(hours=hours, ago=ago)
|
||||||
|
|
||||||
if delta_midnight.days == 0:
|
if delta_midnight.days == 0:
|
||||||
|
date = timezone.localtime(date)
|
||||||
return _("yesterday at {time}").format(time=date.strftime('%H:%M'))
|
return _("yesterday at {time}").format(time=date.strftime('%H:%M'))
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
django==1.8.2
|
django==1.8.2
|
||||||
django-celery-email==1.0.4
|
|
||||||
django-fluent-dashboard==0.5.3
|
django-fluent-dashboard==0.5.3
|
||||||
django-admin-tools==0.6.0
|
django-admin-tools==0.6.0
|
||||||
django-extensions==1.5.2
|
django-extensions==1.5.2
|
||||||
django-transaction-signals==1.0.0
|
|
||||||
django-celery==3.1.16
|
django-celery==3.1.16
|
||||||
celery==3.1.16
|
celery==3.1.16
|
||||||
kombu==3.0.23
|
kombu==3.0.23
|
||||||
|
@ -15,7 +13,7 @@ Pygments==1.6
|
||||||
django-filter==0.7
|
django-filter==0.7
|
||||||
jsonfield==0.9.22
|
jsonfield==0.9.22
|
||||||
python-dateutil==2.2
|
python-dateutil==2.2
|
||||||
https://github.com/glic3rinu/passlib/archive/master.zip
|
passlib==1.6.2
|
||||||
django-iban==0.3.0
|
django-iban==0.3.0
|
||||||
requests
|
requests
|
||||||
phonenumbers
|
phonenumbers
|
||||||
|
|
Loading…
Reference in New Issue