Hi django

13 views
Skip to first unread message

Richard Dushime

unread,
Jun 24, 2021, 11:00:40 AM6/24/21
to django...@googlegroups.com
i have a problem on my navigation bar on the index.html link when i click on it its showing me the error (see error.png)  or everything apart that its working fine  need ur help
<a href="index.html" class="hero-logo" data-aos="zoom-in"><img src="{% static 'assets/img/hero-logo.png' %}" alt=""></a>
      <div class="logo d-block d-lg-none">
        <a href="index.html"><img src="{% static 'assets/img/logo.png' %}" alt="" class="img-fluid"></a>
      </div>

      <nav class="nav-menu d-none d-lg-block">
        <ul class="nav-inner">
          <li class="active"><a href="index.html">Home</a></li>
          <li class="drop-down"><a href="">About</a>
            <ul>
              <li><a href="#about">About Us</a></li>
              <li><a href="#team">Team</a></li>          
            </ul>
          </li>
          <li><a href="#services">Services</a></li>

          <li class="nav-logo"><a href="index.html"><img src="{% static 'assets/img/logo.png' %}" alt="" class="img-fluid"></a></li>

          <li><a href="#portfolio">Portfolio</a></li>
          <li><a href="#pricing">Pricing</a></li>
          <li><a href="#contact">Contact</a></li>

        </ul>
      </nav><!-- .nav-menu -->


error.PNG
navbar.PNG

Julio Cojom

unread,
Jun 24, 2021, 11:05:11 AM6/24/21
to django...@googlegroups.com
Django framework uses urls to math the html files. This work with the same syntax of static files, you would use {% url 'app:viewname' %} to render any page with Django. 

You should check the docs of urls to understand how it works and get this done. 

Regards 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJCm56L%2BG%3D8tLZ%3D3sZ0%3Dh%3Ds-w5AXaLroU3nkgoKZO6Fj8xqFBw%40mail.gmail.com.

Richard Dushime

unread,
Jun 24, 2021, 12:17:37 PM6/24/21
to django...@googlegroups.com
THANK U I HAVE DONE TO FIX IT ITS NOW WORKING

muhammad haris salamat

unread,
Jun 24, 2021, 1:32:10 PM6/24/21
to django...@googlegroups.com
Hi all can u help me plz how I can use filter with Contain query in Django I wanna fetch all data from my database with the help of filter query 

DJANGO DEVELOPER

unread,
Jun 24, 2021, 11:24:18 PM6/24/21
to django...@googlegroups.com

muhammad haris salamat 

just make a form in your template, then have a name='any name here' and then make a view in which you have to get the name in the following way.
query = request.POST.get('any name here')
and then do this:
value = ModelName.objects.filter(Q(model_field = query)


Reply all
Reply to author
Forward
0 new messages