Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Forms Forms Instantiate a Form in a View

Anusha Rao
PLUS
Anusha Rao
Courses Plus Student 972 Points

Now we need to instantiate and show a form to our users. Before we can do that, though, we have to import our forms. Add

I can't find any other proper solution other than what I've written currently

myproject/views.py
from django.shortcuts import render
from .forms import LeadShareForm


def lead_form(request):
    return render(request, 'lead_form.html')
Jonathan Prada
Jonathan Prada
7,039 Points

It is

from . import forms

I had to read the question twice to understand the context