In My django app I have a view called 'StatsView' given below:
class StatsView(LoginRequiredMixin, View):
login_url = '/signin/'
def get(self, request, template='app_folder/ad_accounts/pixel_stats.html', *args, **kwargs):
#Code
return render(request, template, context)
app/urls.py
url(
r'^ad_accounts/(?P<ad_account_id>[^/]+)/pixel_stats',
StatsView.as_view(),
name="pixel_stats"
),
template
pixel_stats.html
<p> test</p>
However when I go to localhost:8000/ad_accounts/acctid/pixel_stats/
I keep running into a Template DoesNotExist Error
. I cant seem to figure out where Im going wrong. Ive added a bunch of URLs and havent run into this issue for any one them.
My app structure is as follows:
project/
app/
templates/
app_folder/
ad_accounts/
pixel_stats.html
views/
ad_accounts/
stats.py