Re: How force DJANGo choice MEDIA_URL or STATIC_URL in template?

2016-03-01 Thread James Schneider
> > > I need choice base url MEDIA_URL (/media/) - for uploaded user picture, or > STATIC_URL (/static/) - picture by default > > I am try next: > > p> alt="picture_for_{{ account.name }}" id="account_picture"> > > , but result is MEDIA_URL(STATIC_URL) and path to file. > > You should work your

Re: problem deploying two apps

2016-03-01 Thread James Schneider
On Tue, Mar 1, 2016 at 8:56 AM, frocco wrote: > Hi, > > I followed this > https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/modwsgi/ > > First app works fine, if I deploy the second app, the settings conflict > and images are not rendered. > > I'm assuming that you

Re: New to Django

2016-03-01 Thread Chris Bartos
The best way to use Python especially Django is by creating what is called a "Virtual Environment". This is a separate instance of Python that you can install all the tools that you need to run your Django app without having to messing up your current Python instance. It will also help to

Re: problem deploying two apps

2016-03-01 Thread Daniel Roseman
On Tuesday, 1 March 2016 16:56:57 UTC, frocco wrote: > > Hi, > > I followed this > https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/modwsgi/ > > First app works fine, if I deploy the second app, the settings conflict > and images are not rendered. > > [code] > Alias /static

[ANNOUNCE] Django security releases issued: 1.9.3 and 1.8.10

2016-03-01 Thread Tim Graham
Today the Django team issued 1.9.3 and 1.8.10 as part of our security process. This releases address two security issues, and we encourage all users to upgrade as soon as possible. Details are available on the Django project weblog:

problem deploying two apps

2016-03-01 Thread frocco
Hi, I followed this https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/modwsgi/ First app works fine, if I deploy the second app, the settings conflict and images are not rendered. [code] Alias /static /var/www/django/track/static Require all granted Require all

Re: How force DJANGo choice MEDIA_URL or STATIC_URL in template?

2016-03-01 Thread Seti Volkylany
it does not help, because I am image by default class AccountUserInfo(models.Model): MAN = 'man' WOMAN = 'woman' VAGUE = 'vague' GENDER_CHOICES = [ (VAGUE, 'Vague'), (MAN, 'Male'), (WOMAN, 'Female'), ] def dispatch_account_media_files(instance,

Re: Missing button image

2016-03-01 Thread weishengtong
Dear all, Thank you for your help and sorry for the late reply. This issue is now solved. It was indeed related to static files and I just needed to run $ python manage.py collectstatic Thanks again. On Wednesday, February 17, 2016 at 11:03:06 PM UTC, WST wrote: > > Hi All, > > > I would

Re: How force DJANGo choice MEDIA_URL or STATIC_URL in template?

2016-03-01 Thread Jonas Svensson
It seems like you want to use display a default picture if the user does not have one. {% load static %} {% static "images/default_pic.jpg" as default_pic %} {{ account.accountuserinfo.picture|default:default_pic }} Cheers On Monday, February 29, 2016 at 10:49:53 PM UTC+1,

Re: bootstrap django crispy forms

2016-03-01 Thread jarmovanlenthe
You should use #burton in your CSS, not .burton. You set the css_id, not the css_class to burton. Jarmo On Tue, Mar 1, 2016 at 1:39 AM James Schneider wrote: > On Fri, Feb 26, 2016 at 7:39 AM, wrote: > >> A simple upload button is proving