Posts by 4ndr3 • 194 points
8 posts
-
5
votes2
answers1428
viewsA: Send objects to a base.html Django template
My question is, how do I send two objects to that file Well, to send two objects to a template you can go through context of function render Ex: def foo(request): object1 = Object1.object.all()…
-
1
votes1
answer225
viewsA: Cannot assign "'Maria'": "Student.name_mae" must be a "Student" instance. When I try to access a student subclass field
After a week of searching, discover that the error was in creating the subclasses Professor and Aluno in different apps. I solved the problem by creating subclasses in the same base class file User:…
-
5
votes1
answer225
viewsQ: Cannot assign "'Maria'": "Student.name_mae" must be a "Student" instance. When I try to access a student subclass field
I have a system with multiple users, I decided to make inheritance of Django’s default user, I have two users: student and teacher, which has several characteristics in common, so I created a base…
-
0
votes1
answer1203
viewsQ: Padding-top does not work in the content below the bootstrap navbar, in firefox browser
Context: I’m using Bootstrap as a framework for the interface and Django part for the business rules and database access part of a website I’m developing. The problem: I have two navbar, one for the…
-
1
votes1
answer535
viewsQ: Able to see through cubes - opengl - pyopengl
Context: I’m using pyopengl 3.0.2 and python 2.7 to make 3ds drawings in opengl, Ubuntu 14.04 as OS and intel hd 3000 as video board. Problem: When executing any cube in opengl the cube becomes…
-
2
votes1
answer345
viewsQ: setTimeout does not work well inside loop
I’m making a game in javascript, it’s like the game Genius.I’m using setTimeout inside the for. function executarJogo(numeroJogada){ var cores = ["#FFFF00","#00FF00","#0000FF","#FF0000"]; for (var i…
javascriptasked 4ndr3 194 -
2
votes1
answer8101
viewsQ: Know the line number of a txt file in c
Is there a function or way to find out how many lines a file has without opening it? I need to divide a file into two parts, so that two processes read it at "the same time". I will use the fseek()…
-
1
votes2
answers3217
viewsQ: split an array into several parts
Is there any way to access only a specific part of an array in c? For example, in python it is possible for me to access a specific part of an array. array[10] = 1,2,3,4,5,6,7,8,9,10 array[4:8] =…