Posts by Gregory • 289 points
9 posts
-
1
votes2
answers763
viewsA: Access related table columns through ORM DJANGO
Samyr, Have you ever tried to access the object? Despite that view that Django gives you from queryset your entire object will be there: >>> p =…
-
3
votes2
answers121
viewsA: Generate querysets from dynamically generated rules
Take a look at Django Filters. It’s super powerful, it already has standard behaviors that I think will suit you, but coce tbm can create its own Filters classes and within them implement its rules…
-
0
votes3
answers429
viewsA: How to use Form in Listview Django?
The ideal is you use listview to list yourself. For the action of deleting believe that Voce must create a Deleteview and fire it when deleting your objects. This way your code will be more…
-
0
votes2
answers1353
viewsA: No module named 'urls' in Django
Instead of doing it that way: from django.conf.urls import url, include from django.contrib import admin from simplemooc.core import views from simplemooc.core import urls urlpatterns = [ url(r'^',…
-
0
votes2
answers247
viewsA: Python module usage in Django
Yes, of course! Including all libs available on https://pypi.python.org/pypi can be installed and used in the project.
-
1
votes2
answers2562
viewsA: Static files on Django
Django searches by default (provided you have the middler Django.contrib.staticfiles in your Settings) in the Static folder of each application and when you run the collectstatic it copies…
-
0
votes1
answer132
viewsA: How to put html links/tags in models.Textfield
You need to tell Jango that this HTML is "reliable" for this: {{ seu_model.Description | safe }} That Django will render.
-
2
votes2
answers2633
viewsA: What is the difference between the MVC architecture and Django’s MTV?
Basically 'it’s a question of nomenclature, the Django view' is exactly the equivalent of the controller in MVC. Ja the template (MTV) and the html file rendered by the view (controller) that would…
-
8
votes14
answers126839
viewsA: Phone Mask Using jQuery Mask Plugin
According to the documentation: var SPMaskBehavior = function (val) { return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; }, spOptions = { onKeyPress: function(val,…