First Week Experience of Internship at Freshlibuilt

First Week Experience of Internship at Freshlibuilt

2 min read

The first week of my internship was completed at Freshlybuilt, where I learned new things and understood how we could run Python files in HTML and CSS and had little experience with Django. How python files in HTML can work in Django.

The best thing in Django with its help was that after installing it, we’ll have to do some work with it, as we do by creating a folder, which makes it easier to keep files in one place, so whenever you want to work In Django, there are already many files in its folder, which makes our work easier, which is a very good thing. Views.py is a file that has a very prominent role in which we can make Python file work in HTML.

Querying data (views.py)

## filename: views.py

from django.shortcuts import render
from .models import Team 

def index(request):
    list_teams = Team.objects.filter(team_level__exact="U09")
    context = {'youngest_teams': list_teams}
    return render(request, '/best/index.html', context)
    

# Rendering data (HTML templates)

## filename: best/templates/best/index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Home page</title>
</head>
<body>
  {% if youngest_teams %}
    <ul>
      {% for team in youngest_teams %}
        <li>{{ team.team_name }}</li>
      {% endfor %}
    </ul>
  {% else %}
    <p>No teams are available.</p>
  {% endif %}
</body>
</html>

And I also learned how we can add many things to the web page in html and css and if we face any problem in our work, our mentor is always ready and there is solidarity among the team members. I was excited about this project from the beginning when it was revealed that we might get a chance to work on this project and I am even more excited to work on it further.

Tags:
Choose your Reaction!
Leave a Comment