Questions tagged as 'django'

1
answer

How to create a local network (intranet) with django? [closed]

I'm breaking my head, I have tried several and different gringos tutorials and nothing works with excellence. I have a django system on a regular computer (windows 10) and I'm trying to leave the localhost open for other network computers to acc...
asked by 03.07.2018 / 21:16
1
answer

Heroku Login Error: Can not read property 'body' of undefined

Hello I'm getting the following error while trying to log in. heroku login heroku: Enter your login credentials Email: ########@gmailTypeError: Cannot read property 'body' of undefined at new HerokuAPIError (C:/ProgramFiles/heroku/clie...
asked by 09.06.2018 / 18:19
1
answer

Error accessing localhost: 8000 / profile

page profiles.html <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <title>ConnectedIn</title> </head> <body> <h1>Detalhe Perfil</h1> </body> </...
asked by 13.05.2018 / 22:05
1
answer

Problems setting up views using django

I'm studying django and I'm having problems in the following part {'posts': posts} I'm using as ide pycharm and it shows error but for me the syntax of the code is correct. from django.shortcuts import render from django.utils import timezone f...
asked by 12.05.2018 / 01:36
2
answers

Returning manager in template (Django)

How do I return the number of books published in the template? I have this # models.py class PublishedManager(models.Manager): def published(self): return self.filter(published=True) class Book(models.Model): name = model...
asked by 08.06.2016 / 09:48
2
answers

filter list in a Django admin foreign key field

I have two questions, both related to the form automatically generated by django admin. If I create an administrative screen I can solve these problems, but working directly with the admin I am suffering a bit, even because I believe that the ad...
asked by 23.01.2018 / 18:01
1
answer

Django + AJAX - POST 404 (Not Found)

I'm trying to implement a system of likes in a Django + AJAX application, but when trying to do the operation in question I'm getting the following error in the browser console: POST http://localhost:8000/forum/like/ 404 (Not Found) . I do...
asked by 10.01.2018 / 15:07
1
answer

Inner Join ORM Django

I have 2 models: class MdlCourse(models.Model): id = models.BigAutoField(primary_key=True) category = models.ForeignKey(MdlCourseCategories, on_delete=models.CASCADE) sortorder = models.BigIntegerField() fullname = models.CharF...
asked by 08.01.2018 / 17:33
1
answer

Problems loading static files in Django in deploy in heroku

I'm trying to deploy an app that I started in django in heroku, but I'm having trouble loading the css / js / imgs files, here's how my folders and settings look! settings.py BASE_DIR = os.path.dirname(os.path.dirname(__file__)) PROJECT_ROO...
asked by 11.12.2017 / 15:27
1
answer

Django 2.0 - Urls Amigavel

I'm studying Django 2.0.2, and I'm having trouble with friendly URL along with SlugField in the models.py class, but I can not set def get_absolute_url(self): correctly. I can access the URL directly. It is now necessary to define the fun...
asked by 20.02.2018 / 23:09