Re: Django models `EmailField` default is empty string - Not `None` (or Null) . Why ?

2021-06-14 Thread Aymeric Augustin
Hello, https://docs.djangoproject.com/en/3.2/ref/models/fields/#django.db.models.Field.null should clarify the situation. -- Aymeric. > On 13 Jun 2021, at 13:17, Carlos Leite wrote: > > > Yesterday I

Django models `EmailField` default is empty string - Not `None` (or Null) . Why ?

2021-06-13 Thread Carlos Leite
Yesterday I realized that, Django email field default value is not "Null" actually is an empty string ("") - Although I'm not code often, I was surprised. I wrote some tests for a model where an `emailfield` was supposed to be `null=False`. But during the tests, it didn't raise an Exception

Re: Django Models

2019-08-09 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer

Re: Django Models

2019-08-08 Thread RAVVE MAALIE
Actually you can refer to one to many relation model. Its like one user has multiple address Or One adress has multiple users. In models file. You can make changes. Like For 1 user multiple address Eg: Class User(models.Model): User_name= models.Charfield() Class

Django Models

2019-08-08 Thread göktürk sığırtmaç
Hi, I'm developing app with django. I have users module. My database schema users table and address table. Address table have foreign key from users table. Now how can compose app architecture? Should i new module as address and i should put address model etc. or Should i write address table in

Re: Extending Django models with Schevo

2017-02-18 Thread Tim Allen
> > On Friday, February 17, 2017 at 3:57:42 PM UTC-5, Etienne Robillard wrote: >> >> Hi, >> >> I'm planning to extend django-hotsauce to support a generic "model" API. >> I would like to reuse the Django models API to support Schevo databases. >>

Re: Extending Django models with Schevo

2017-02-18 Thread Etienne Robillard
Hi Tim, I'm looking for technical comments about developing Django models classes using the Schevo DBMS. http://www.isotopesoftware.ca/documentation/libschevo/ I would like to use this like so: $ manage.py schevo test myapp $ manage.py schevo db-update myapp $ manage.py schevo shell

Re: Extending Django models with Schevo

2017-02-17 Thread Tim Graham
17, 2017 at 3:57:42 PM UTC-5, Etienne Robillard wrote: > > Hi, > > I'm planning to extend django-hotsauce to support a generic "model" API. > I would like to reuse the Django models API to support Schevo databases. > Ideally, I would like to introspect into my reusabl

Extending Django models with Schevo

2017-02-17 Thread Etienne Robillard
Hi, I'm planning to extend django-hotsauce to support a generic "model" API. I would like to reuse the Django models API to support Schevo databases. Ideally, I would like to introspect into my reusable Django apps to discover configured features. Importing and exporting data from/

Re: Changing the primary key of Django models

2016-02-05 Thread Tim Graham
; >> To django-d...@googlegroups.com , >> >> I'm a Django user and I'm working on converting Speedy Net from PHP to >> Django. I would like to know if it's possible in Django to change the >> primary key of Django models, such as User? I don't like the auto-increment

Re: Changing the primary key of Django models

2016-02-05 Thread Dheerendra Rathor
t;u...@speedy.net> wrote: > To django-developers@googlegroups.com, > > I'm a Django user and I'm working on converting Speedy Net from PHP to > Django. I would like to know if it's possible in Django to change the > primary key of Django models, such as User? I don't like the auto-increm

Changing the primary key of Django models

2016-02-05 Thread Uri Even-Chen
To django-developers@googlegroups.com, I'm a Django user and I'm working on converting Speedy Net from PHP to Django. I would like to know if it's possible in Django to change the primary key of Django models, such as User? I don't like the auto-increment default primary key, it doesn't make

Re: About: Feature request: Comments in Django models saved to database schema

2012-07-26 Thread Anssi Kääriäinen
On 26 heinä, 18:55, Andrei Antoukh wrote: > 2012/7/24 Anssi Kääriäinen > > > On 22 heinä, 23:01, Andrei Antoukh wrote: > > > Hello! > > Hello! > > > > > > > > > > > > > > I started working on what had been proposed. In the commithttps:// > >

Re: About: Feature request: Comments in Django models saved to database schema

2012-07-26 Thread Andrei Antoukh
2012/7/24 Anssi Kääriäinen > On 22 heinä, 23:01, Andrei Antoukh wrote: > > Hello! > Hello! > > > > I started working on what had been proposed. In the commithttps:// > github.com/niwibe/django/commit/af887029integeintege614ca53d8...< >

Re: About: Feature request: Comments in Django models saved to database schema

2012-07-24 Thread Anssi Kääriäinen
On 22 heinä, 23:01, Andrei Antoukh wrote: > Hello! > > I started working on what had been proposed. In the > commithttps://github.com/niwibe/django/commit/af887029integeintege614ca53d8... > is > the initial

Re: About: Feature request: Comments in Django models saved to database schema

2012-07-22 Thread Andrei Antoukh
Hello! I started working on what had been proposed. In the commit https://github.com/niwibe/django/commit/af887029integeintege614ca53d8bdab23f0a40ee7420b9bc20 is the initial implementation. It is based on the Anssi

Re: About: Feature request: Comments in Django models saved to database schema

2012-07-09 Thread Andrei Antoukh
2012/7/9 Anssi Kääriäinen > On 7 heinä, 22:25, Andrei Antoukh wrote: > > Hello! > > > > I am writing about the issues: > https://code.djangoproject.com/ticket/13867https://code.djangoproject.com/ticket/18468 > > > > I am not the author of these issues, but

Re: About: Feature request: Comments in Django models saved to database schema

2012-07-09 Thread Anssi Kääriäinen
On 7 heinä, 22:25, Andrei Antoukh wrote: > Hello! > > I am writing about the > issues:https://code.djangoproject.com/ticket/13867https://code.djangoproject.com/ticket/18468 > > I am not the author of these issues, but I think this feature is > interesting to have in the ORM. > I

About: Feature request: Comments in Django models saved to database schema

2012-07-07 Thread Andrei Antoukh
Hello! I am writing about the issues: https://code.djangoproject.com/ticket/13867 https://code.djangoproject.com/ticket/18468 I am not the author of these issues, but I think this feature is interesting to have in the ORM. I agree that we should not do things just because we can make! In the

Re: Django models and different types

2012-05-11 Thread Michael da Silva Pereira
Apologies got the groups confused. -- Mike -- * * *Tradepage, now part of the Cloud Group, is an Authorised Google Apps for Business Reseller. For only R450 per user per year, get Business Email, Calendars, Documents, syncing with mobile devices and much more. Find out more:

Re: Django models and different types

2012-05-11 Thread Karen Tracey
Please ask questions about using Django on django-users. The topic of this list is the development of Django itself. Karen -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

Django models and different types

2012-05-11 Thread Michael da Silva Pereira
Hi, Looking for some ideas around a type / conversion matching issue I'm having with a big django model. The model has tons of variables, and all being of different types (int, nullbool, date, datetime, string). I'm trying to pass data from a different database into the django model, but the

Re: Django models should not contain 'evaluate' field/method since Django 1.1

2010-05-27 Thread Łukasz Korzybski
Sure, The ticket: http://code.djangoproject.com/ticket/13640#preview Greetings, Lukasz On May 25, 2:49 pm, Jacob Kaplan-Moss wrote: > On Tue, May 25, 2010 at 12:06 PM, naos wrote: > > I was migrating some django project recently from django

Re: Django models should not contain 'evaluate' field/method since Django 1.1

2010-05-25 Thread Jacob Kaplan-Moss
On Tue, May 25, 2010 at 12:06 PM, naos wrote: > I was migrating some django project recently from django 1.0.4 to 1.2. > In Django 1.2/1.1 I found that if model have 'evaluate' attribute then > one will get exception in admin edit page for that model if the page >

Django models should not contain 'evaluate' field/method since Django 1.1

2010-05-25 Thread naos
Hi, I was migrating some django project recently from django 1.0.4 to 1.2. In Django 1.2/1.1 I found that if model have 'evaluate' attribute then one will get exception in admin edit page for that model if the page contains inline forms with related models: Exception Value: 'Shipper' object has

Re: Fully Polymorphic Django Models: a simple implementation

2010-01-22 Thread hejsan
This is the best news I've heard for a long time! This was also my biggest disappointment with Django. This bit me in my first django project, which incidentally was also my first experience with ORM. Basically I had the following class structure: Project Art Project Research Project

Re: Fully Polymorphic Django Models: a simple implementation

2010-01-22 Thread rvdrijst
should use. A custom > custom queryset class can be defined and used like this:: > >         class MyQuerySet(PolymorphicQuerySet): >             def my_queryset_method(...): >                 ... > >         class MyModel(PolymorphicModel): >             my_objects=PolymorphicMa

Fully Polymorphic Django Models: a simple implementation

2010-01-15 Thread Bert Constantin
elA. If 50 objects are ModelA and 50 are ModelB, then two queries are executed. If result_objects contains only the base model type (ModelA), the polymorphic models are just as efficient as plain Django models (in terms of executed queries). The pathological worst case is 101 db queries if resu

Re: Django Models

2007-09-24 Thread Ludovico Magnocavallo
James Bennett wrote: > > It used to work in older versions of Django. Right now it is not > supported, and it is probably quite dangerous to the integrity of your > data to rely on things which accidentally "sort of work" due to the > remains of the legacy system. Again: this is not currently

Re: Django Models

2007-09-24 Thread James Bennett
On 9/24/07, Ludovico Magnocavallo <[EMAIL PROTECTED]> wrote: > I have always read that Django does not support model inheritance or > subclassing, but in my experience some forms of it work. Take the > following for example, straight from a running app: It used to work in older versions of

Re: Django Models

2007-09-24 Thread Ludovico Magnocavallo
James Bennett wrote: > > Django does not currently support any form of subclassing or > inheritance for model classes. Please search the archives of this > list, the django-developers list, or the Django Trac instance if you > would like more information on this topic. I have always read that

Re: Django Models

2007-09-24 Thread James Bennett
On 9/24/07, Sebastien Lannez <[EMAIL PROTECTED]> wrote: > Is it a limitation of SQLLite ? If not, how can we implement this > mapping ? Django does not currently support any form of subclassing or inheritance for model classes. Please search the archives of this list, the django-developers list,

Django Models

2007-09-24 Thread Sebastien Lannez
Hi, I've seen something which is not very "concept proof"... at least in SQLLite ( hasn't been tested on PostgreSql or MySql ) >>> class A(Models.models): ... name = CharField(primaryKey=True) ... field_1 = CharField() ... >>> class B(A) ... field_2 = CharField ... Django will then build

Re: DB to Django Models

2006-12-15 Thread Jacob Kaplan-Moss
On 12/15/06 1:38 PM, [EMAIL PROTECTED] wrote: > Hello, i was thinking of developing some modules that did the > transalation from any DataBase supported by Django to the Django > Models. For example, i have a db in production but would like to use it > with Django, then i would hav

Re: DB to Django Models

2006-12-15 Thread Joseph Kocherhans
On 12/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, i was thinking of developing some modules that did the > transalation from any DataBase supported by Django to the Django > Models. For example, i have a db in production but would like to use it > with Djan

DB to Django Models

2006-12-15 Thread [EMAIL PROTECTED]
Hello, i was thinking of developing some modules that did the transalation from any DataBase supported by Django to the Django Models. For example, i have a db in production but would like to use it with Django, then i would have to rewrite all the Data Base Abstraction but in the Django Models