Re: Django ContentTypes required?

2022-02-05 Thread Chaos Chameleon
t;> declare an explicit app_label and isn't in an application in INSTALLED_APPS. >>> >>> I have nothing in the INSTALLED_APPS except my apps and: >>> >>> 'django.contrib.staticfiles', >>> 'rest_framework', >>> >&

Re: Django ContentTypes required?

2020-07-10 Thread JJ Zolper
app_label and isn't in an application in INSTALLED_APPS. >> >> I have nothing in the INSTALLED_APPS except my apps and: >> >> 'django.contrib.staticfiles', >> 'rest_framework', >> >> Was trying an attempt where I avoided migrating co

Re: Django ContentTypes required?

2020-07-06 Thread Dan Madere
Type doesn't declare > an explicit app_label and isn't in an application in INSTALLED_APPS. > > I have nothing in the INSTALLED_APPS except my apps and: > > 'django.contrib.staticfiles', > 'rest_framework', > > Was trying an attempt where I

Django ContentTypes required?

2020-07-06 Thread JJ Zolper
rib.staticfiles', 'rest_framework', Was trying an attempt where I avoided migrating contenttypes into a legacy database. Best, JJ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rec

Re: Data migration fails because contenttypes not yet ready

2015-03-19 Thread Daniel Hahler
lthough I don't think it would help much by itself.) Thanks, Daniel. On 22.01.2015 14:23, Markus Holtermann wrote: > The sanest way to generate all ContentTypes and Permissions is to > migrate those two apps explicitly before migrating the remaining apps: > > $ python m

Re: Data migration fails because contenttypes not yet ready

2015-01-22 Thread Markus Holtermann
uot; issue, which is part of 1.8, will allow you to use custom methods on your model manager inside `RunPython` (e.g `MyUser.objects.create_a_fancy_user_account()`) and isn't related to the problem you are running into. The sanest way to generate all ContentTypes and Permissions is to migrate

Re: Data migration fails because contenttypes not yet ready

2015-01-22 Thread Daniel Hahler
Hello, I was having the same issue as Torsten: it does not appear to be possible to load initial data related to contenttypes or auth during migrations. As for the problem with contenttypes reported by Torsten, a workaround appears to be calling `update_all_contenttypes` manually from your

Re: Data migration fails because contenttypes not yet ready

2014-10-21 Thread Torsten Bronger
Hallöchen! Markus Holtermann writes: > Are you talking about Django 1.7 migrations or South? In the > former case you need to make sure that your datamigration depends > on the contenttypes application. I'm talking about Django 1.7 migrations. Unfortunately, contenttypes is al

Re: Data migration fails because contenttypes not yet ready

2014-10-21 Thread Markus Holtermann
Hey Torsten, Are you talking about Django 1.7 migrations or South? In the former case you need to make sure that your datamigration depends on the contenttypes application. If you use South: yes, calling update_all_contenttypes seems to be a valid solution. Best, Markus On Tue, Oct 21, 2014

Data migration fails because contenttypes not yet ready

2014-10-21 Thread Torsten Bronger
Hallöchen! I want to implement an initial data migration (basically, the same thing initial_data.json used to do). The problem is that my initial data must be connected with ContentType instances. However, update_all_contenttypes() hasn't been called at this stage, so my migration fails. As far

python manage.py reset contenttypes doesnt work with mysql 5.5.1 Works with 5.1

2011-04-12 Thread David Markey
Simple django setup, when I try to reset contenttypes app, just after doing a syncdb.. python manage.py reset contenttypes You have requested a database reset. This will IRREVERSIBLY DESTROY any data for the "contenttypes" application in the database "my_test". Are you sure

Re: contenttypes installed but not ???

2011-03-24 Thread Jon Walsh
The error is caused by importing an additional settings module (into settings.py). I can't figure out why though... since they are mostly just variables with string values... -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

contenttypes installed but not ???

2011-03-24 Thread Jon Walsh
If anyone could make sense of the below traceback, I'd greatly appreciate it! Noting that contenttypes is installed (as seen below) but Django says it isn't (as seen below). thanks in advance! Jon === Environment: Request Method: GET Request

Using contenttypes without auth

2011-02-19 Thread xcephe  
If you use contenttypes without auth in INSTALLED_APPS (eg, being used) it seems the auth models still get installed. When you run syncdb with a state content type, it will prompt to delete the stale CT entry and the Permission model tries to clean up: File "/home/wk/projects/rootproj/d

Re: contenttypes and dumpdata options

2011-02-01 Thread Preston Timmons
Hi JD, Yes, using natural keys will allow you to serialize models that use the contenttypes framework. You can read about this feature here: http://docs.djangoproject.com/en/dev/topics/serialization/#natural-keys Preston On Jan 29, 1:59 pm, jd wrote: > hello, > What's the current

contenttypes and dumpdata options

2011-01-29 Thread jd
hello, What's the current recommended way to deal with contenttypes when you move a db using dumpdata? I know about excluding it, but I read something about using the ---natural option with the dump command would work as well. Does this work when including contenttypes in the dump? Which i

Re: null = True and blank = True in contenttypes generic relations: why not ?

2010-01-18 Thread Karen Tracey
On Mon, Jan 18, 2010 at 3:58 AM, Alessandro Pasotti wrote: > Hello, > > I would like to have a table with optional pointers to other tables > items, generic relations would do it fine, the only problem seems to > be the fact that generic forreign keys don't accept null values. > > Any hint or idea

null = True and blank = True in contenttypes generic relations: why not ?

2010-01-18 Thread Alessandro Pasotti
Hello, I would like to have a table with optional pointers to other tables items, generic relations would do it fine, the only problem seems to be the fact that generic forreign keys don't accept null values. Any hint or idea about why NOT NULL is enforced in this kind of relations ? -- Alessa

Re: Newbie question on ContentTypes and Generic Relations

2009-06-14 Thread Rana
blog and article model that will both display > > data from a related products model. I read that the way I should do > > this is through the ContentTypes framework and generic foreign > > relations. I would be grateful for some guidance on how to do this. > > I've read th

Re: Newbie question on ContentTypes and Generic Relations

2009-06-13 Thread Daniel Roseman
On Jun 12, 8:54 pm, Rana wrote: > Hi, > > I am trying to modify a blog and article model that will both display > data from a related products model. I read that the way I should do > this is through the ContentTypes framework and generic foreign > relations. I would be

Newbie question on ContentTypes and Generic Relations

2009-06-12 Thread Rana
Hi, I am trying to modify a blog and article model that will both display data from a related products model. I read that the way I should do this is through the ContentTypes framework and generic foreign relations. I would be grateful for some guidance on how to do this. I've rea

Re: Abstract model or ContentTypes?

2009-05-28 Thread V
o that I can make the event on the rendered   > calendar a link to the assignment page or field trip page or test/quiz   > page, etc. Should I make an abstract model called EventCategory, for   > example, and make the Assignment, FieldTrip, and Test/Quiz models   > subclass EventCategory,

Abstract model or ContentTypes?

2009-05-27 Thread Michael Keselman
page or field trip page or test/quiz page, etc. Should I make an abstract model called EventCategory, for example, and make the Assignment, FieldTrip, and Test/Quiz models subclass EventCategory, or use the contenttypes framework for the category in the Event model and then just limit the

Re: Does the INSTALLED_APPS order of auth and contenttypes maters?

2009-03-25 Thread @@
this: Certain applications (in particular, > contenttypes and auth) dynamically create database content > (permissions, content type identifiers, etc) when they are > synchronized. When you dump a fixture, those dynamically created > content types etc are stored in the fixture. > &

Re: Does the INSTALLED_APPS order of auth and contenttypes maters?

2009-03-25 Thread Russell Keith-Magee
ssed. > But i still can't figure out why this happens, and only happens in some > testcases. Ordinarily the order in INSTALLED_APPS _shouldn't_ matter. However, this looks like you're hitting a form of #7052. The problem plays out like this: Certain applications (in particula

Does the INSTALLED_APPS order of auth and contenttypes maters?

2009-03-25 Thread @@
Hi, I run into a strange problem when i changed my code a little and then test my apps.In some tests(not the first) i got the error message below: Traceback (most recent call last): File "D:\coding\codes\django\django\test\testcases.py", line 202, in __call__ self._pre_setup() File "D:\cod

Re: ContentTypes and fixtures

2009-01-30 Thread Eric Holscher
On Jan 30, 12:06 pm, Oliver Beattie wrote: > > Oliver, meet ticket #7052. Ticket #7052, meet Oliver :-)\ > > Thanking you, I'm not as familiar with the tickets as I should be =) > > > The best workaround that I can suggest is to include your ContentTypes > > in

Re: ContentTypes and fixtures

2009-01-30 Thread Oliver Beattie
> Oliver, meet ticket #7052. Ticket #7052, meet Oliver :-)\ Thanking you, I'm not as familiar with the tickets as I should be =) > The best workaround that I can suggest is to include your ContentTypes > in your fixtures. They are dumpable objects, just like everything else > i

Re: ContentTypes and fixtures

2009-01-29 Thread felix
t; contain a patch. On IRC a few days back, Eric Holscher mentioned that > he had a nasty hack that implemented a fix for this. I don't know how > far that hack has gone, or if he will be willing to share code. > > The best workaround that I can suggest is to include your Conten

Re: ContentTypes and fixtures

2009-01-28 Thread Russell Keith-Magee
gone, or if he will be willing to share code. The best workaround that I can suggest is to include your ContentTypes in your fixtures. They are dumpable objects, just like everything else in Django. If your fixture contains the content types, it doesn't matter what primary key values are automati

ContentTypes and fixtures

2009-01-28 Thread Oliver Beattie
antee that the ContentType table was always in a constant state. However, I can't do this now. Since contenttypes uses a signal to populate its database (which runs before my fixtures are imported) amy fixture containing ContentType data is useless (duplicate primary key errors obviously). Ho

small contenttypes mystery

2009-01-10 Thread Eric Abrahamsen
I've got a Topic model, which is a bit like a category. Then there are TopicItem objects, which have a foreign key to a Topic, and a generic foreign key to anything else in the website, so that I can attach anything to a particular Topic. In my admin site, a few models have a generic inlin

Re: Test failures with SQLite :memory: database - contenttypes, auth and sites

2008-10-29 Thread Chris H.
Brian, Thanks for the reply! On Oct 28, 4:57 pm, Brian Gershon <[EMAIL PROTECTED]> wrote: > I just ran into this same issue.  I eventually figured out that adding > TEST_DATABASE_NAME to settings.py (to prevent Django from using the > default memory database for sqlite) works around the issue.

Re: Test failures with SQLite :memory: database - contenttypes, auth and sites

2008-10-28 Thread Brian Gershon
Hi Chris, I just ran into this same issue. I eventually figured out that adding TEST_DATABASE_NAME to settings.py (to prevent Django from using the default memory database for sqlite) works around the issue. As far as debugging the memory database problem, I was getting the "IntegrityError: dja

Test failures with SQLite :memory: database - contenttypes, auth and sites

2008-10-25 Thread Chris H.
I've noticed at work and with my personal code that since the upgrade to Django 1.0 that I'm getting test failures when I run the unit tests under a SQLite :memory: database. I thought it might be something to do with those two codebases, so this morning I started a fresh project and I'm seeing t

Re: ContentTypes Framework and generic relations : no index on object_id ?

2008-09-07 Thread bruno desthuilliers
body, > > > > Today I was hunting down some serious performance problems in my app > > > and I found something pretty "confusing". I realized that, when > > > creating generic relations with the ContentTypes framework (http:// > > > docs.djangoproject.

Re: ContentTypes Framework and generic relations : no index on object_id ?

2008-09-06 Thread Sylvain
> > and I found something pretty "confusing". I realized that, when > > creating generic relations with the ContentTypes framework (http:// > > docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1) Django > > does create a foreign key relationship on the content_

Re: ContentTypes Framework and generic relations : no index on object_id ?

2008-09-05 Thread bruno desthuilliers
On 5 sep, 23:52, Sylvain <[EMAIL PROTECTED]> wrote: > Hi everybody, > > Today I was hunting down some serious performance problems in my app > and I found something pretty "confusing". I realized that, when > creating generic relations with t

ContentTypes Framework and generic relations : no index on object_id ?

2008-09-05 Thread Sylvain
Hi everybody, Today I was hunting down some serious performance problems in my app and I found something pretty "confusing". I realized that, when creating generic relations with the ContentTypes framework (http:// docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1) Django doe

Re: TestCase breaks on contenttypes - possible bug in trunk?

2007-12-19 Thread crybaby
I am getting this error when I run syncdb command in linux and get this error: ValueError: list.remove(x): x not in list How did you fix it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: TestCase breaks on contenttypes - possible bug in trunk?

2007-10-31 Thread appenz
Quick Addendum: The issue may be Mac only, on Linux behaviour seems to differ. Both Mac and Linux run Python 2.5.1 (self-compiled, not from the OS). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

TestCase breaks on contenttypes - possible bug in trunk?

2007-10-31 Thread appenz
go/core/management/sql.py", line 457, in emit_post_sync_signal verbosity=verbosity, interactive=interactive) File "./django-trunk/django/dispatch/dispatcher.py", line 360, in send **named File "./django-trunk/django/dispatch/robustapply.py", line 47, in robustApply r

Re: contenttypes

2007-07-02 Thread Russell Keith-Magee
ntenttype > but its very vague. Could someone help me please? I don't know what sort of example you are looking for, but the idea behind contenttypes is that every model that Django manages has a corresponding entry in the ContentTypes table. If your application has the models Author, A

contenttypes

2007-07-02 Thread Lic. José M. Rodriguez Bacallao
Hi everyone, I really need some help on the contentypes app, could someone explain me how it work with an example, I have read a little explanation on: http://feh.holsman.net/articles/2006/06/03/django-contenttype but its very vague. Could someone help me please? -- Lic. José M. Rodriguez Bacalla

ContentTypes / App Labels / Permissions

2007-01-18 Thread David Cramer
We've run into a pretty annoying issue lately with Django. Being that our site is VERY large, and the codebase has become a framework for the smaller sites, which all run off the same load balanced servers, we began seperating content. For example: - We have www.curse-gaming.com, which is all t

Re: generic relation | contenttypes issue

2006-12-19 Thread Rob Slotboom
Please provide your model. Something is wrong with the tags attribute. Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com T

admin-interface ... how to handle a list with different contenttypes

2006-08-07 Thread patrickk
class FilmhausPreview(models.Model): contenttype = models.ForeignKey(ContentType) entry = models.IntegerField('ID') position = models.PositiveSmallIntegerField('Position', unique=True, editable=False) It´s a list of different entries (movies, programs, news ...) to be

Re: ContentTypes usage

2006-07-20 Thread Uros Trebec
Jacob Kaplan-Moss wrote: > On Jul 19, 2006, at 7:49 AM, Uros Trebec wrote: > > Does anyone know how to use this thing? > > I do :) That's good to hear! :) > But you're really going to need to give me more information about > what you're trying to do in order for me to help. Remember: specific

Re: ContentTypes usage

2006-07-20 Thread Ian Holsman
o any object in your schema. (ie it is painfully easy to add comments to the 'user' object, or 'forum' object, or 'review' object)and do things like row-level permissions.regardsIanOn 21/07/2006, at 11:24 AM, Uros Trebec wrote:Aidas Bendoraitis wrote: You ca

Re: ContentTypes usage

2006-07-20 Thread Uros Trebec
Aidas Bendoraitis wrote: > You can learn about ContentTypes from > http://www.djangoproject.com/documentation/models/generic_relations/ > and also from the code of django.contrib.comments Thank you very much for this one! I'll try to figure it out.

Re: ContentTypes usage

2006-07-19 Thread Jacob Kaplan-Moss
On Jul 19, 2006, at 7:49 AM, Uros Trebec wrote: > Does anyone know how to use this thing? I do :) But you're really going to need to give me more information about what you're trying to do in order for me to help. Remember: specific questions get the best answers. Jacob --~--~-~--

Re: ContentTypes usage

2006-07-19 Thread Aidas Bendoraitis
You can learn about ContentTypes from http://www.djangoproject.com/documentation/models/generic_relations/ and also from the code of django.contrib.comments Good luck! Aidas Bendoraitis [aka Archatas] On 7/19/06, Uros Trebec <[EMAIL PROTECTED]> wrote: > > Hi everyone! > > I&

ContentTypes usage

2006-07-19 Thread Uros Trebec
Hi everyone! I'm trying to figure out how to use django.contrib.contenttypes. There is no official documentation, code is not documented enough and I could only find this [0] blog post from which I can't get anything useful from. Does anyone know how to use this thing? [0] http://feh.holsman.ne