Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7859347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:53:18+00:00 2026-06-02T21:53:18+00:00

The thing I really hate when learning a new language / framework is how

  • 0

The thing I really hate when learning a new language / framework is how ignorant I feel when I get stuck on a seemingly easy to solve issue.

I have a django for loop inside a html page but for some reason it is not working. I have missed something and cannot fix the issue on my own, so I turn to StackOverflow to help me.

This is my model I am running my query on models.py:

class RIAchievement(models.Model):
  riAchievementID = models.AutoField(primary_key=True, db_column="RIAchievementID")
  userLanguageVersionID = models.ForeignKey(UserLanguageVersion, db_column="UserLanguageVersionID")
  typeAchievementID = models.ForeignKey(TypeAchievement, db_column="TypeAchievementID")
  riAchievementTypeUserDescription = models.CharField(max_length=255, blank=True, null=True, db_column="RIAchievementTypeUserDescription")
  riAchievementDescription = models.TextField(max_length=2000, db_column="RIAchievementDescription")
  auth_user_id = models.ForeignKey(auth_user, db_column="auth_user_id")
  class Meta:
    db_table="RIAchievement"

This is where my models.py file is located in my project: GlobalXpy\app_data\models.py

This is the code within my views.py file:

from django.shortcuts import render_to_response
from GlobalXpy.app_data.models import RIAchievement

def index(request):
  ri_achievement = RIAchievement.objects.all()
  get_template = loader.get_template('ri_achievement.html')
  return render_to_response(get_template)

This is the for loop that is inside my template file (ri_achievement.html):

{% for e in ri_achievement %}
  <td> Preview  Edit  Duplicate  Delete </td>
  <td> FlagPath </td>
  <td> AchievementType / RIAchievementTypeUserDescription </td>
  <td> {{ e.riAchievementDescription }} </td>
{% endfor %}

Any assistance would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T21:53:20+00:00Added an answer on June 2, 2026 at 9:53 pm
    from django.shortcuts import render
    from GlobalXpy.app_data.models import RIAchievement
    
    def index(request):
      ri_achievement = RIAchievement.objects.all()
      return render(request, 'ri_achievement.html',{'ri_achievement': ri_achievement})
    

    In your template:

    {% if ri_achievement %}
       There are {{ ri_achievement|length }} records:
       {% for e in ri_achievement %}
          <td> Preview  Edit  Duplicate  Delete </td>
          <td> FlagPath </td>
          <td> AchievementType / RIAchievementTypeUserDescription </td>
          <td> {{ e.riAchievementDescription }} </td>
       {% endfor %}
    {% else %}
       There are no records in the system
    {% endif %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new into JavaScript and I really like jQuery and hate when it comes
One thing really really annoys me about the Eclipse ide : its find UI
One thing I really miss about Java is the tool support. FindBugs, Checkstyle and
One thing I really like about AS3 over AS2 is how much more compile-time
One thing that really bothers me about Google Code is that fact that it
The one thing I really miss in vim is a tiered intellisense support, just
There is one thing I really love about LXML, and that the E builder.
I used to work in JavaScript a lot and one thing that really bothered
I've read The Nature of Lisp . The only thing I really got out
One thing that's really been making life difficult in getting up to speed on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.