arn how
veteran Django programmers build their web application.
By taking a look <https://www.djangosites.org/> I found really great
websites but I was unable to decide which one of them goes along the
lines of Django programming guidelines and philosophy.
Thank you,
Utkarsh Singh
-
I am facing problems while trying to use GeoDjango (v2.2) with MySQL 8.0.19
I created a new PointField and ran makemigrations
geo_code = PointField(srid=4326)
On running sqlmigrate on the generated migration - I notice that the column
does not have a SRID constrain
BEGIN;
--
-- Create model Loca
GeoDjango is not respecting SRIDs with MySQL 8.
I created a new column
geo_code = PointField(srid=4326)
and ran makemigrations. Running sqlmigrate on the generated migration gives
BEGIN;
--
-- Create model Location
--
CREATE TABLE `locations_location` (`id` integer AUTO_INCREMENT NOT NULL
PR
I am doing a project in which I have to create a login app which only
logins with EMAIL ID. There is permission given to certain email ids and
only those email ids could login. After the login the user will be provided
with an OTP on the required email for authentication. So, know how to go
abo
okay will get back to you after looking into it
On Sat, Sep 21, 2019 at 11:02 PM Ankita Gupta
wrote:
> Not related to Django, I have a project made in python3 but due to some
> package installation, i need to convert my project to python2. Is there any
> method or package to solve this?
>
> --
>
Dear All,
My aim is to obtain all unique call stacks where model classes are
accessed.
To implement it, I thought of overriding save(), delete(), and
get_query_set() methods, as follows -
class MyModelClass(CallStackMixin, models.Model) # Mixin to override save,
and delete
objects =
*Aim to achieve* - Get call stacks where specific model classes are used.
(Example - MyModel.objects.save(), MyModel.objects.filter(), etc)
*My Approach - *
Add this in order to override *Save* and *Delete*.
Class MyModelClass(CallStackMixin, models.Model)
In order to override *get_query_set
Also, in
https://github.com/django/django/blob/master/django/db/models/manager.py#L126
Is `manager_method.__name__` name of the query set Method?
On 17 June 2015 at 13:47, Utkarsh J wrote:
> Simon,
>
> I guess that is not what I am looking for. It will print "get_query_se
Simon,
I guess that is not what I am looking for. It will print "get_query_set"
I am more interested in getting the names of methods.
On 17 June 2015 at 11:59, Simon Charette wrote:
> Hi Utkarsh,
>
> I guess you could define a __getattribute__[1] method on your manager?
I am trying to log overridden calls to QuerySetAPI. Say I am calling
Example.objects.filter(id=1)and I have following code in Models.py
objects = MyManager()
and in MyManager I have-
class MyManager(Manager):
def get_query_set(self):
# logging stuff I am doing
return super
Hi!
So, there is a huge Django app with multiple classes in Model. I am
interested in getting call stacks of some classes. I have few questions in
the approach and few questions regarding the implementation. I am using
Django 1.4.20 and python 2.7
1. What if we decide to write a decorator for
I have a datetime field in my model. Initially when an object is created of
this model the datetime field is set as NULL (I've defined Null=True and
blank=True)
Now I want to change make a query which filters all the objects having Null
in this field.. and changing their datetime to current dat
12 matches
Mail list logo