bug, I realized that the widgets quote characters and
> numbers as the value of the primary key.
>
> The challenge I have is that the widgets don't quote keys with primary key
> value that is a number and the unicode of the number is a special
> character. E.g, let's assume the
Also understand that using '0' for a primary key is NOT recommended by
MySQL; look at:
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_auto_value_on_zero
This has bitten me before when migrating data from other types of DBMS.
On Thursday, 5 January 2023 at 12:0
We have a lot of such fields in our database and never seen such an error.
What I can think that may happen is that some row already assigned the id
of 0, and changing the column type or adding a id column (which probably
overrides the automatic one django generates for each model), and now it
c
e target model.
>
> Cheers
> Markus
>
> On Fri, Sep 2, 2022, at 10:39 AM, Manasvi Dobariya wrote:
>
> I have default primary key in the model which is being referenced as
> foreign key in another model. Now, when I change this primary key type from
> AutoField to BigAutoField, m
default primary key in the model which is being referenced as foreign
> key in another model. Now, when I change this primary key type from AutoField
> to BigAutoField, migrations for only primary keys are being generated no
> migration for foreign key is generated. However, when I ap
I guess it might be changed by postgres. Have you checked postgres
documentation ?
On Fri, 2 Sep 2022, 18:45 Manasvi Dobariya, wrote:
> I have default primary key in the model which is being referenced as
> foreign key in another model. Now, when I change this primary key type from
>
I have default primary key in the model which is being referenced as
foreign key in another model. Now, when I change this primary key type from
AutoField to BigAutoField, migrations for only primary keys are being
generated no migration for foreign key is generated. However, when I apply
the
i'm still a new here
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https:/
You might want to ask this at https://groups.google.com/g/django-developers,
as that is where the framework devs have their discussions. This is more
of a users group, and I think you'll get a faster answer by posting there.
On Tuesday, March 22, 2022 at 6:20:41 AM UTC-4 Gregor Jerše wrote:
>
Hi,
I have a question regarding Django version 3.2.12.
When I change the DEFAULT_AUTO_FIELD to BigAutoField and create&apply
migrations, the foreign keys of auto-generated through tables are dropped.
This can be observed by running sqlmigrate which drops foreign key relations
but never recreat
Hi, do you mean in the GET request, the user provides the pk (perhaps in
URL) or the server sends to users an object where pk is a field?
If it's the former, then @George's answer is the right one. An example of
what you are trying to achieve will be helpful.
Best
Zheng
On Tue, Jul 21, 2020 at 1
You use request.GET['choice_filed']
On Monday, July 20, 2020 at 9:14:48 AM UTC+5:30, Arpana Mehta wrote:
>
> Hi,
> I have a class with a GET and a POST request. I am sending the data ( with
> pk of the object ) in my GET request and I want the frontend to use that pk
> to refer to the exact inst
Hi,
I have a class with a GET and a POST request. I am sending the data ( with
pk of the object ) in my GET request and I want the frontend to use that pk
to refer to the exact instance of the model whenever doing any operation.
In my POST request I am only sending the `choice field` value. How do
t;
> > Hello Soumen, you should use a CharField with the primary_key=True
> > attribute for your model. This way no no automatic primary key
> > field is generated, your field will be implicitly unique and non-
> > null though. Only one primary key is allowed in a model.
> >
On 24 Jun 2020, at 06:24, Soumen Khatua wrote:
Yes, at the time of add a new record in model, automatically I want
to create a custom ID and insert it into model
There is a post about this at Stack Overflow:
https://stackoverflow.com/questions/52070462/django-generate-custom-id
-- Clive
rimary_key=True
> > attribute for your model. This way no no automatic primary key
> > field is generated, your field will be implicitly unique and non-
> > null though. Only one primary key is allowed in a model.
> >
> > class Foo(models.Model)
> > id = models.Cha
On 23 Jun 2020, at 23:32, Oleg Kishenkov wrote:
Hello Soumen, you should use a CharField with the primary_key=True
attribute for your model. This way no no automatic primary key
field is generated, your field will be implicitly unique and non-
null though. Only one primary key is allowed
Hello Soumen, you should use a CharField with the primary_key=True
attribute for your model. This way no no automatic primary key field is
generated, your field will be implicitly unique and non-null though. Only
one primary key is allowed in a model.
class Foo(models.Model)
id
In the documentation they are specified, How to set Primary Key in Django
model but In my case, I want to generate custom Primary Key?!
On Wed, Jun 24, 2020 at 1:36 AM David Chorpash
wrote:
> Hi Soumen,
>
> Are you looking for this?
> https://docs.djangoproject.com/en/3.0/ref/m
Hi Soumen,
Are you looking for this?
https://docs.djangoproject.com/en/3.0/ref/models/fields/#primary-key
You should be able to create a field in your model and set the primary_key
to True
On Tue, Jun 23, 2020 at 1:18 PM Soumen Khatua
wrote:
> Hi Folks,
>
> In Django is there a
Hi Folks,
In Django is there any way to create custom Primark Key like:
M01234GH, M056YUOIP, etc.
Please help me guys.
Thank you in advance
Regards,
Soumen Khatua
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group
ks,
>
> I want to start my primary key from saome random number like: (onwards)
> but not from 1. How I can do that in django?
>
> Thank you in advance
>
> Regards,
> Soumen
>
> --
> You received this message because you are subscribed to the Google Groups
>
On 22/01/2020 5:32 am, Soumen Khatua wrote:
Hi Folks,
I want to start my primary key from saome random number like:
(onwards)
but not from 1.
I wonder why?
How I can do that in django?
If I really had to do that I would adjust the relevant sequence manually
via PGAdmin.
Otherwise
Just right a simple python function With random number generation...
And call it where you want to use it
On Wed, 22 Jan 2020, 12:03 am Soumen Khatua,
wrote:
> Hi Folks,
>
> I want to start my primary key from saome random number like: (onwards)
> but not from 1. How I ca
Hi Folks,
I want to start my primary key from saome random number like: (onwards)
but not from 1. How I can do that in django?
Thank you in advance
Regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe
ld, done a migration, a look at
the database nothing has changes, the id is still a autogenerated sequence
(postgresql uses sequences as primary key).
the "nexval(...seq)" is in it too.
I does the manually: "ALTER TABLE xyz ALTER id DROP DEFAULT" and that
worked. Now the id (=p
Hi Muhammed,
On 20/01/2020 11.25, Muhammed Rafi A wrote:
|importuuid uuid.uuid4().hex[:8]
|
|or
|fromdjango.utils.crypto importget_random_string
get_random_string(8).lower()
||
def get_random_string(length=12,
allowed_chars='abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ012345
Khatua
wrote:
> Hi Folks,
>
> I want to generate unique 6 digit primary key for django models and I want
> to generate this for 10 billon users. So guys please could you tell me How
> I can do that?
>
> I tried UUID module but it's generating some big numbers.
>
> T
Thank you for your email
On Mon, Jan 20, 2020 at 3:09 PM Kasper Laudrup
wrote:
> Hi again,
>
> On 20/01/2020 10.22, Kasper Laudrup wrote:
> >
> > You want to generate a number between 0 and 1.000.000 that should be
> > unique for 10.000.000.000 instances?
> >
> > I hope you can understand why th
Hi again,
On 20/01/2020 10.22, Kasper Laudrup wrote:
You want to generate a number between 0 and 1.000.000 that should be
unique for 10.000.000.000 instances?
I hope you can understand why that doesn't make any sense.
Thinking a bit more about, you don't specify whether it should be in
b
Hi Soumen,
On 20/01/2020 10.01, Soumen Khatua wrote:
Hi Folks,
I want to generate unique 6 digit primary key for django models and I
want to generate this for 10 billon users. So guys please could you tell
me How I can do that?
You want to generate a number between 0 and 1.000.000 that
I’m not sure a six digit model would support 10bn unique values.
On Mon, Jan 20, 2020 at 4:01 AM Soumen Khatua
wrote:
> Hi Folks,
>
> I want to generate unique 6 digit primary key for django models and I want
> to generate this for 10 billon users. So guys please could you tell me
Hi Folks,
I want to generate unique 6 digit primary key for django models and I want
to generate this for 10 billon users. So guys please could you tell me How
I can do that?
I tried UUID module but it's generating some big numbers.
Thank you
Regards,
Soumen
--
You received this me
I am aware that I can specify any model's primary key by adding that kwarg
to a field within the model. I currently do this with most my models, using
UUIDField as the primary key:
class MyModel(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4,
editable=
I'm running django 1.11, have this same issue. Has this issue been fixed in
later versions of django? Is there a workaround for 1.11?
On Sunday, November 12, 2017 at 7:30:45 AM UTC-5, Liuyang Wan wrote:
>
> Thanks for the link. It’s interesting that two years past the bug is still
> unresolved.
can you explain it indetail
On Wed, Jan 9, 2019 at 7:18 PM Stodge wrote:
> Is there a way to get the maximum value that an ID can be for a model that
> uses AutoField for its primary key? For example, in PostgreSQL I could do:
>
> SELECT maximum_value FROM information_schema.seq
Is there a way to get the maximum value that an ID can be for a model that
uses AutoField for its primary key? For example, in PostgreSQL I could do:
SELECT maximum_value FROM information_schema.sequences WHERE sequence_name =
'my_sequence_id_seq';
maximum_value
---
99
réas
Den ons 2 jan. 2019 kl 11:20 skrev Osezele Orukpe :
> I would like to know if django DetailView can be used with other fields
> apart from slug and primary key?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group
I would like to know if django DetailView can be used with other fields
apart from slug and primary key?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
;s no setting but this is controlled by the allows_auto_pk_0
>>>> feature flag [0].
>>>> Database feature are set to the default database configurations so
>>>> Django can
>>>> minimized the number of introspection queries required to work
>>>>
module and set feature_class to a
>>> .features.DatabaseFeatures[1]
>>> subclass that sets the allows_auto_pk_0 flag to True.
>>>
>>> e.g.
>>>
>>> #foo/bar/base.py
>>>
>>> from django.db.backends.mysql.base import DatabaseWrap
xpects
>>
>> 1. A .base submodule [2]
>> 2. A class named DatabaseWrapper [3]
>>
>> The foo.bar module path can be renamed to whatever you want.
>>
>> Cheers,
>>
>> [0]
>> https://github.com/django/django/blob/e817ae74da0e515db31907ebcb2d
ends/mysql/features.py#L27
> [1]
> https://github.com/django/django/blob/e817ae74da0e515db31907ebcb2d00bcf7c3f5bc/django/db/backends/mysql/base.py#L184
> [2]
> https://github.com/django/django/blob/e817ae74da0e515db31907ebcb2d00bcf7c3f5bc/django/db/utils.py#L110
> [3]
> https://github
ng the following test inside the MySQL
> shell:
>
> create table number (number int not null auto_increment primary key);
> insert into number(number) values (0); select * from number; drop table
> number;
>
> ++
> | number |
> ++
> | 0 |
> +---
check that this works by running the following test inside the MySQL
shell:
create table number (number int not null auto_increment primary key);
insert into number(number) values (0); select * from number; drop table
number;
++
| number |
++
| 0 |
++
1 row in set (0,0
id =
models.CharField(primary_key=True,default='first')
.how can i insert a custom auto generated primary with the organization
name for example 'cha' and a number starting from 1000 so the final id
would be cha1000 and next id would be cha1001
Thanks & Regars
ch
db_column='MakeId') class Meta: unique_together =
(('icatid', 'makeid'),)
On Wednesday, 17 October 2018 11:25:48 UTC+5:30, Rakhee Menon wrote:
>
> Hi Everyone,
>
> I have a scenario where one field needs to be a primary key and another
> field needs to be an Auto
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On Tue, Oct 16, 2018 at 10:55:48PM -0700, Rakhee Menon wrote:
> Hi Everyone,
>
> I have a scenario where one field needs to be a primary key and another
> field needs to be an AutoFieldand Autofield requires a condition
> pri
t;
> I have a scenario where one field needs to be a primary key and another
> field needs to be an AutoFieldand Autofield requires a condition
> primary_key = true
>
> I get this error
> django_reports.MstCompositionFm.makeid: (fields.E100) AutoField
Hi Everyone,
I have a scenario where one field needs to be a primary key and another
field needs to be an AutoFieldand Autofield requires a condition
primary_key = true
I get this error
django_reports.MstCompositionFm.makeid: (fields.E100) AutoFields must set
primary_key=True
Naoko
I ma facing the problem of updating primary key automatically in django
with postgresql database
Could you please suggest what need to be done.
Do we need to create a sequence for the table to achieve this.
Hoping for your reply
On Sunday, May 29, 2011 at 8:32:45 PM UTC+5:30
alf Of *Mark Phillips
> *Sent:* Tuesday, May 29, 2018 4:15 PM
> *To:* django users
> *Subject:* How to get the primary key of the underlying model in a
> ModelForm?
>
>
>
> I have a model, Document, and an associated DocumentForm(forms.
> ModelForm), and a DocumentAdmin(admin
clean
method. If you are updating a document, then pk will populated.
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Mark Phillips
Sent: Tuesday, May 29, 2018 4:15 PM
To: django users
Subject: How to get the primary key of the underlying model in a
I have a model, Document, and an associated DocumentForm(forms. ModelForm),
and a DocumentAdmin(admin.ModelAdmin). In the clean method of the
DocumentForm, I need to get the document_id (ie primary key) of the
underlying Document, but it is not included in the field set for that form.
I need the
Mar 15, 2018 at 5:20 PM, M Mackey wrote:
> Well, I don't seem to be able to get around this. I'm going to have to
> switch away from using a UUID as a primary key, which fortunately doesn't
> seem like too much work.
>
>
> On Thursday, March 1, 2018 at 8:53:13 AM UT
Hi, I think the problem comes from mod_wsgi. I had the same problem when
virtualhost listen on multiple ports.
Please look at this GH issue
https://github.com/GrahamDumpleton/mod_wsgi/issues/206
and try this
by
https://github.com/GrahamDumpleton/mod_wsgi/issues/206#issuecomment-305019825
by Du
Well, I don't seem to be able to get around this. I'm going to have to
switch away from using a UUID as a primary key, which fortunately doesn't
seem like too much work.
On Thursday, March 1, 2018 at 8:53:13 AM UTC-8, M Mackey wrote:
>
> I added some debug support, a
I added some debug support, and there are only two classes called UUID when
this fails:
uuid UUID:
psycopg2.extensions UUID:
The psycopg extension is a converter, and it seems highly unlikely that it
was put into place as the value, and I doubt it would report it's __str__
as the UUID str
Not to belabor the point, but this is the part that I find weird. This is
down in the "During handling of the above exception ('UUID' object has no
attribute 'replace'), another exception occurred" section.
/usr/local/venvs/attrack/lib/python3.6/site-packages/django/db/models/fields/__init__.py
M UTC-8, M Mackey wrote:
>
> I've run into a strange issue with using a UUID as primary key, and I'm
> hoping we can either verify this is a bug, or figure out what I've done
> wrong.
>
> I've got a core model object with a UUID for it's primary key. (Gene
My notes don't say I did that, and I tried a new env and sys.path still
shows /usr/local/lib/python3.6.
Maybe that's just a red herring. But I don't have any other good
explanation for the UUID getting passed to the UUID __init__.
On Friday, February 23, 2018 at 9:12:33 AM UTC-8, Tom Evans wrot
On Fri, Feb 23, 2018 at 4:20 PM, M Mackey wrote:
> I have noticed in the python
> path that there are two paths to .../lib/python3.6. One from my virtualenv,
> and one at /usr/local/. Not sure where to clear that up, since I don't
> believe I've got my apache env set up to pull from both places.
The thing that gets me is this part:
.../django/db/models/fields/__init__.py in to_python
> return uuid.UUID(value) ...
> /usr/local/lib/python3.6/uuid.py in __init__
> hex = hex.replace('urn:', '').replace('uuid:', '') ...
>
> During handling of the above exception ('U
e exception ('UUID' object has no attribute
'replace'), another exception occurred:
.../django/core/handlers/exception.py in inner
On Monday, February 12, 2018 at 1:00:53 PM UTC-8, M Mackey wrote:
>
> I've run into a strange issue with using a UUID as primary key,
OnetoOneField may what you want!
---Original---
From: "Michael MacIntosh"
Date: 2018/2/17 09:42:29
To: "django-users";
Subject: Re: Multiple models and a primary key
I'm not sure what you are trying to achieve, but you
probably don't
I'm not sure what you are trying to achieve, but you probably don't want
all of the models to use the same primary key.
You can access the primary key though via the pk or id attributes. For
instance:
Grade.objects.all().values("subjt_id", "subjt__pk", "subjt
Ok, thanks for replying. am quite new in Django. Am looking for a way to
use a primary key in 3 models in my django project. for instance. The
models are Profile, Subject and Grade. Want subject to link to profile and
grade to link to subject.
class Profile(models.Model): f_name
Use a storage/caching layer of CUIDs instead? http://usecuid.org/
Aha
On Mon, Feb 12, 2018 at 11:24 AM, M Mackey wrote:
> I've run into a strange issue with using a UUID as primary key, and I'm
> hoping we can either verify this is a bug, or figure out what I've done
&g
I've run into a strange issue with using a UUID as primary key, and I'm
hoping we can either verify this is a bug, or figure out what I've done
wrong.
I've got a core model object with a UUID for it's primary key. (Generated
external to this system, thus using
Sent: Monday, December 11, 2017 1:35 PM
To: Django users
Subject: Re: PRIMARY KEY in view PostgreSQL
Hello Matthew,
This should be fixed in Django 2.0 by
daf2bd3efe53cbfc1c9fd00222b8315708023792[0].
I'd appreciate if you could chime in the related django-developer thread[1] to
mention
you
gt;
>
>
> Upon further investigation, it appears that I need a PRIMARY KEY in the
> backend to avoid having to include columns in a GROUP BY clause, but
> PostgreSQL does not allow for such constraints to be added to a VIEW. The
> “id” column is just a row_number().
>
>
aggregate function."
Upon further investigation, it appears that I need a PRIMARY KEY in the backend
to avoid having to include columns in a GROUP BY clause, but PostgreSQL does
not allow for such constraints to be added to a VIEW. The "id" column is just
a row_number().
I was wonderin
Thanks for the link. It’s interesting that two years past the bug is still
unresolved.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@
ate uuid field
>
> On Fri, Nov 10, 2017 at 10:54 PM, Liuyang Wan > wrote:
>
>> Let's say in my Django project I have two models A and B.
>>
>> class A(models.Model):
>> something...
>>
>> class B(models.Model):
>> a = models.ForeignK
(models.Model):
> a = models.ForeignKey(A)
>
> Later on I decided to use uuid as the primary key value. so I update the
> models:
>
> import uuid
>
> class A(models.Model):
> id = models.UUIDField(
> db_index=True,
> default=uuid.uuid4,
>
Let's say in my Django project I have two models A and B.
class A(models.Model):
something...
class B(models.Model):
a = models.ForeignKey(A)
Later on I decided to use uuid as the primary key value. so I update the
models:
import uuid
class A(models.Model):
id = models.UUID
thanks Gourav. I really appreciate your inputs.
On Tue, Oct 3, 2017 at 9:16 PM, Gourav Chawla <
gauravchawla.chawla...@gmail.com> wrote:
> Glad, you worked it out. You can use them whenever you want. Function
> based views require you to write more code but give you more clarity on
> what's happe
Glad, you worked it out. You can use them whenever you want. Function based
views require you to write more code but give you more clarity on what's
happening. On the other hand CBV help you keep the codebase cleaner.
At the end of the day, it's you who has to decide what to use.
--
You receiv
you would follow for functional
> view. But for CBV you have DetailView that takes care of this. Hope this
> helps.
>
>
> On Monday, October 2, 2017 at 2:53:04 PM UTC+5:30, tangoward15 wrote:
>>
>> Hi guys, I just want to know how to access and load the data associ
. This is just the approach you would follow for functional
> view. But for CBV you have DetailView that takes care of this. Hope this
> helps.
>
>
> On Monday, October 2, 2017 at 2:53:04 PM UTC+5:30, tangoward15 wrote:
>>
>> Hi guys, I just want to know how to acces
you would follow for functional
view. But for CBV you have DetailView that takes care of this. Hope this
helps.
On Monday, October 2, 2017 at 2:53:04 PM UTC+5:30, tangoward15 wrote:
>
> Hi guys, I just want to know how to access and load the data associated to
> a primary key in a temp
Hi guys, I just want to know how to access and load the data associated to
a primary key in a template.
models.py
class Team_Region(models.Model):
name = models.CharField(max_length=50)
# String representation
def __str__(self):
return self.name
class Team_Name
if you remove your primary key, you will not be able to identify your
record in your database, could you please precise what do you want to
achieve by doing this ?
Le vendredi 4 août 2017 14:07:19 UTC+2, jagadishreddy bommareddy a écrit :
>
> I am using Django frame work in that models
You can’t. You can change what field is the primary key, but you can’t remove
the primary key. Just specify primary_key=True on the field you would like to
make your primary key.
>From the docs:
Each model requires exactly one field to have
primary_key=True<https://docs.djangoproject.
I am using Django frame work in that models.py in any field i don't want
primarykey how can i avoid primary key
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, se
Hello;
I have a model with a CharField which is used as primary key:
class MyModel( Model ):
string_id = CharField("StringID" , primary_key = True )
I would now like to migrate this model to have a normal integer AutoField
as primary key, and the string_id field shou
When I try to update_or_create model object with primary key that is also a
foreign key in some other model I get DoesNotExist error and then
IntegrityError duplicate entry error. My way around this is to try get the
object and then update it without the primary key or create it (with
primary
COMMENT 'Field2',
> Field3 VARCHAR(200)NOT
> NULLCOMMENT 'Field3',
> Field4
> VARCHAR(300)DEFAULT NULLCOMMENT
>
On Tue, Jan 03, 2017 at 01:56:00PM +0100, Simone Federici wrote:
> Hi,
>
> from compositekey import db
>
> On my compositekey project the development is stopped on 1.5 django release.
> https://github.com/simone/django-compositekey
>
> The Django 1.6 release, with an huge ORM refactoring and a h
COMMENT 'Field2',
> Field3 VARCHAR(200)NOT
> NULLCOMMENT 'Field3',
> Field4 VARCHAR(300)
> DEFAULT NULLCOMMENT 'Field4',
OMMENT 'Field3',
Field4
VARCHAR(300)DEFAULT NULLCOMMENT
'Field4',
KEY ( Field2 ),
FOREIGN KEY (Field2) REFERENCES item (Field2) ON DELETE CASCADE,
PRIMARY KEY ( Field1, Fie
A model was designed with a wrong assumption of uniqueness and given a
natural key. We now need to switch to a surrogate primary key.
Upgrading Django is currently not an option. The production database
may not be dropped/restored for this, it is in use by several
unrelated projects (remember the
unique_together = ('network', 'link')
>
> @property
> def link_disabled(self):
> return self.type == AssociationType.REMOVED
> ```
>
> When trying to simply create a new object django raises an error:
>
> ```
> link_assoc = Network
def link_disabled(self):
return self.type == AssociationType.REMOVED
```
When trying to simply create a new object django raises an error:
```
link_assoc = NetworkLinkAssociation()
link_assoc.link = link
link_assoc.network = network
link_assoc.save()
```
"ValueError: Cannot fo
> I am considering to use shortuuid
> <https://github.com/nebstrebor/django-shortuuidfield> as the primary key
> for my models.
>
> Is there any downside to this?
> Does it severely affect db indexing?
>
--
You received this message because you are subscribed to the Google Groups
why are you considering?
On Thu, Oct 27, 2016 at 7:34 AM, Suren Sth wrote:
> I am considering to use shortuuid
> <https://github.com/nebstrebor/django-shortuuidfield> as the primary key
> for my models.
>
> Is there any downside to this?
> Does it severely affect d
I am considering to use shortuuid
<https://github.com/nebstrebor/django-shortuuidfield> as the primary key
for my models.
Is there any downside to this?
Does it severely affect db indexing?
--
You received this message because you are subscribed to the Google Groups
"Django users
a new table without primary key in Django modeling. ?
>
> I'm porting a old program to Django web framework. After inspect
> database to modules.py and then syncdb, It create the id filed with
> primary key attribute, how can I disable this feature ?
--
You received this message
Hi All,
I have created a model with primary key, later i have removed the primary
key and used default `id` as primary key
When i tried to migrate it is throwing error with multiple primary keys
defined
Before running migrate i have executed on MySQL command interface
"ALTER
ame to add child table its
not working.Its just shows "Please correct the error below".And then i
tried to save through userinterface views(out of admin) it shows the
following error "The inline foreign key did not match the parent instance
primary key".
--
You rece
1 - 100 of 494 matches
Mail list logo