Issue: I have an existing database, so the guide in
https://docs.djangoproject.com/en/1.8/howto/legacy-databases/ to inspect db
and created models.py .
That table does NOT have an 'id' column, and the created models.py doesn't
have 'id' either, and the class is unmanaged (managed=False). But w
Django Version: (1, 8, 0, 'final', 0)
Issue: I have an existing database, so I integrated it following the
instruction in https://docs.djangoproject.com/en/1.8/howto/legacy-databases/
to inspectdb and generated models.py. That table does NOT have column 'id',
so the generated models.py doesn't hav
The automatic ID field would not be added if you have a primary key. I'm
not sure if inspectdb does pick up primary keys, I believe it does though.
I feel this discussion may be more suited to django-users, our forum for
helping debugging user issues.
Marc
On 28 April 2015 at 07:48, Ben L wrote
On Tue, Apr 28, 2015 at 1:59 AM, Ben in campus wrote:
> That table does NOT have column 'id', so the generated models.py doesn't
> have 'id' either. The model is unmanaged (managed = False).
if your table has a primary key, add the primary_key=True flag to that
field and Django won't add an 'id'
I'll try to get a PR/proposal to fix the issue as soon as I get some free
time this week.
Should I also submit a bug here? https://code.djangoproject.com
Thanks,
Ion
On Saturday, April 25, 2015 at 5:00:02 PM UTC-7, Tim Graham wrote:
>
> It seems like a bug to me. If I had to guess, I'd say it'
Yes. Any non-trivial pull request should have a Trac ticket. See also our
patch review checklist:
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#patch-review-checklist
.
On Tuesday, April 28, 2015 at 10:40:44 AM UTC-4, Ion Scerbatiuc wrote:
>
> I'll
It is true that the table doesn't have a primary key.
1, I might be able to talk to the DBA to add a primary key in here and re-sync
the class. But is that required for each table to have pk to run Django?
2, what if I just modify the class to have fake pk =True, but not modify the
database st
I do that since years with tables not having a primary key without
problems, but I am only using django orm on those to select data.
Am 28.04.2015 17:35, schrieb Ben L:
It is true that the table doesn't have a primary key.
1, I might be able to talk to the DBA to add a primary key in here and
I've opened a pull request for fixing an import on the translation
documentation, I just changed ugettext_lazy to ungettext_lazy.
You can check this PR: https://github.com/django/django/pull/4575
--
You received this message because you are subscribed to the Google Groups
"Django developers (
Hi Ben,
Thanks for the change you suggested.
On Tuesday 28 April 2015 09:48:26 Ben L wrote:
>[paraphrase] An automatic primary key shouldn't be added to unmanaged models,
>[paraphrase] the current behavior where it is added is a bug
Please have a look at the documentation[1] -- it states clearl
Thanks. For future reference, we don't need a message to this list in order
to know when a pull request is opened.
On Tuesday, April 28, 2015 at 1:16:28 PM UTC-4, Mounir Messelmeni wrote:
>
> I've opened a pull request for fixing an import on the translation
> documentation, I just changed ugett
It's an amazing idea. Thanks for putting it up, Aymeric and Tim!
Can we add a question regarding usage of test frameworks (i.e., unittest2,
py.test, nose) similar to "Which popular third-party apps do you rely on?"
For example "Which test frameworks do you use?" - "unittest2, py.test,
nose, oth
12 matches
Mail list logo