These are chat archives for django/django

Apr 2016
Michal Haták
Apr 10 2016 14:37
Hello, is it possible to have project-base template which can be used by installed apps ?
Dr M. Kaddour YAHYAOUI
Apr 10 2016 14:40
Try cookiecutter from Fortin @Twista
Michal Haták
Apr 10 2016 14:46

definitely will take a look, but its too complex atm i think. i just started with django and trying to build dummy stuff to learn how it works under the hood
i’m trying to make something like

- project_name
    - templates
        - layout.html
    - app_one
        - templates
            - app_one
                - index.hml

where index.html will use (extend) layout.html and i’m still getting TemplateDoesNotExist error

Michal Haták
Apr 10 2016 15:02
ha, found it. i had absolute path in DIRS in config
Puneet Aggarwal
Apr 10 2016 16:39
Hello everyone..
Which is the best Django package for third party logins like Facebook? I am using DRF for all REST APIs at backend and Satellizer package in AngularJS SPA at front end.
Apr 10 2016 17:21

i want to show some dynamic places in my web site and i follow this toturial geojson geojson
class MushroomSpot(models.Model):
geom = PointField()
description = models.TextField()
picture = models.ImageField()

def popupContent(self):
  return '<img src="{}" /><p><{}</p>'.format(
#MushroomSpot is the ForeignKey to other models in my model
from leaflet.admin import LeafletGeoAdmin,LeafletGeoAdmin)

all work without error code. but in my admin(administrator page) i cant to add points because dont show me the map.

Peter Bittner
Apr 10 2016 20:50
@puneetagg django-allauth, or python-socialauth
Ibrahim Ahmed
Apr 10 2016 21:15
hi. I am following the Django tutorial at . I am looking at the method str(): and I am wondering what it does ?
Apr 10 2016 22:21
@gmwill92 general communication between backend and frontend is REST API, for django packages: django REST framework, tastypie and othes. Many models from frontend frameworks can send REST requests, or have plugins for that.
Adam Collins
Apr 10 2016 23:07
@ibz096 it's invoked in various situations when you need to convert your model to a string. For example if you print an instance of your model whatever is returned in the method will be displayed. One of the most notable places you'll see it is in the admin panel. If you don't specify a str method you'll see the same string for each instance of the model, which can be confusing. It's often uselful to return some identifying string in the method, so you can differentiate between the instances.
Dr M. Kaddour YAHYAOUI
Apr 10 2016 23:31
Hi I'm just asking. How to reload(os) in the file?
Iforgot to' import os ' first, and even after adding the line in settings i 'm stuck with errorname bug