Iframe'd page in Django template can't find it's Javascript or CSS files, 404 error

2017-03-04 Thread Tom Tanner
In my `views.py`, I have one path render an html file: def interactive(request): if request.session.get('interactiveID') == None: t= get_template('blank-interactive.html') else: interactive_template= 'interactive-' + str(request.session['id']) + '/index.html' t= get_templa

Re: Iframe'd page in Django template can't find it's Javascript or CSS files, 404 error

2017-03-04 Thread Daniel Roseman
On Saturday, 4 March 2017 13:30:37 UTC, Tom Tanner wrote: > > In my `views.py`, I have one path render an html file: > > def interactive(request): > if request.session.get('interactiveID') == None: > t= get_template('blank-interactive.html') > else: > interactive_template= 'inte

Re: Iframe'd page in Django template can't find it's Javascript or CSS files, 404 error

2017-03-04 Thread Tom Tanner
>How are you referring to the assets in the template? In `interactive/index.html`, in the `` tag, I have `` On Saturday, March 4, 2017 at 8:55:22 AM UTC-5, Daniel Roseman wrote: > > On Saturday, 4 March 2017 13:30:37 UTC, Tom Tanner wrote: >> >> In my `views.py`, I have one path render an html fi

Annotated queryset + Prefetch object

2017-03-04 Thread Jose Kilo
Hi all, I'm trying to use an annotated queryset inside a Prefetch object. For some reason I'm not getting the expected result. This is a simplified version of my models and query. class User(models.Model): following = models.ManyToManyField('User', related_name='followers', through='Follo

Re: Iframe'd page in Django template can't find it's Javascript or CSS files, 404 error

2017-03-04 Thread Daniel Roseman
On Saturday, 4 March 2017 15:57:49 UTC, Tom Tanner wrote: > > >How are you referring to the assets in the template? > > In `interactive/index.html`, in the `` tag, I have ` src="scripts/main.js">` > Well, if you wanted to load the scripts from /interactive-1/scripts/main.js, then that's what you

Hello I am new to django

2017-03-04 Thread sarfaraz ahmed
I am trying to create custom user authentication using abstractbaseuser. All worked fine. but I wanted to move first_name and last_name to other models from django.db import models from django.contrib.auth.models import AbstractBaseUser,BaseUserManager,PermissionsMixin from django.core.mail impor