Can you explain how is your data or database schema, your model is based on
a ORM design?, I mean that you probably need to check API token validation
El dom., 21 de agosto de 2022 12:23 p. m., Shams Ulhaq <
ulhaqshams...@gmail.com> escribió:
> i have a code that have multiple relation for gettin
i have a code that have multiple relation for getting data i need someone
who can help me in getting data in serializer
--
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 em
After numerous attempts I think I found my solution. (NO ERRORS)
supplier/models.py
shipment = models.ForeignKey(
Shipment, on_delete=models.DO_NOTHING, null=True, blank=True)
specie/models.py
no reference to any other model
supplier/
Well my friend, the only reason I have to do the imports is because each
model is in it's own app. In every example I have seen the models are
usually small and contained in one app.
Perhaps I need to redesign my project to have everything lumped together?
In my project I have an app for base, sh
Hi,
You shouldn't have to import since the models are in the same models.py
On Wednesday, January 26, 2022 at 2:26:13 PM UTC-5 frank...@gmail.com wrote:
> After trying the suggestions I get these errors.
>
> supplier.models:
>
> class Supplier(models.Model):
>
> name = models.CharField(m
After trying the suggestions I get these errors.
supplier.models:
class Supplier(models.Model):
name = models.CharField(max_length=50)
phone = models.CharField(max_length=15, null=True, blank=True)
email = models.CharField(max_length=120, null=True, blank=True)
country = model
Thank you so much. Have a great day!
frank-
On Wed, Jan 26, 2022 at 6:51 AM bnmng wrote:
> I would start by defining Supplier in your models.py, then Shipment with a
> ForeignKey reference to Supplier
>
> I'm assuming (forgive me if I'm wrong) that not only can a shipment have
> many species,
I would start by defining Supplier in your models.py, then Shipment with a
ForeignKey reference to Supplier
I'm assuming (forgive me if I'm wrong) that not only can a shipment have
many species, but a species can be in many shipments, so if that's the
case, the most obvious way is to go with Ma
I have tried several different ways but I cannot seem to get this right.
What I have is a list
of suppliers. Each supplier can have many shipments and each shipment can
have many species. Seems simple enough but apparently I must be more
simple.
I need a suggestion of how to relate these tab
Yes, my example is not right. Both should be the same!
nader...@gmail.com schrieb am Donnerstag, 19. August 2021 um 16:59:01 UTC+2:
> I noticed that subassembly 6 has different components in use. Is that what
> you want.
>
> On Wed, Aug 18, 2021, 10:57 AM M. GW wrote:
>
>> Hi,
>>
>> I am now tr
Hey,
thank you. I tried your approach and is looks very promising but I am
getting an error. Here is my view:
*class AssemblyDetailView(LoginRequiredMixin, DetailView):*
*model = Assembly*
*template_name = "engineering/assembly/assembly_detail.html"*
*assem = Assembly.objects.all()*
I noticed that subassembly 6 has different components in use. Is that what
you want.
On Wed, Aug 18, 2021, 10:57 AM M. GW wrote:
> Hi,
>
> I am now trying, for days, to get a tree like view from my assembly model
> into my template. I think I have read everything what I have found on
> StackOver
I would create two dictionaries, one for subassembly and one for component.
then in your view, loop through the first group, pulling your data from a
master dataset:
assem = Assembly.objects.all()
sa = assem.subassembly.all()
comp = assem.component.all()
send 'sa' and 'comp' to your template as
Hi,
I am now trying, for days, to get a tree like view from my assembly model
into my template. I think I have read everything what I have found on
StackOverflow and other sites. Somehow I am not able to get it working. I
am trying to not use any 3rd party extensions => I'm happy to be proven
On Thu, Feb 20, 2020 at 5:53 PM Kirankumar
wrote:
> Hii All..
>
> I'm trying to give level roles like admin defaultly it is
> available and Manager group and normal user groups in my django
> aplication...
>
> Generally admin can fetch all the records created by all
> users..N
Hii All..
I'm trying to give level roles like admin defaultly it is
available and Manager group and normal user groups in my django
aplication...
Generally admin can fetch all the records created by all
users..Now my requirement is the user which is in manager group can fet
I'm writting 2 models with ManyToMany Relations, first I make a model to
list all my requirements
class Requirements(models.Model):
requirement = models.CharField(max_length=150)
def __str__(self):
return self.requirement
So in this example my list of requirements will be:
- Person
On 10/02/2019 6:22 pm, Nick Emery wrote:
I am trying to wrap up my first app using Django (specifically Django
Rest Framework which may change the save behavior), but have run into
an issue that I haven't been able to solve for about 10 hours now.
I am trying to override the save() method of a
UPDATE: Finally figured it out! I ultimately did this by overriding
`perform_create()` in my [Django Rest Framework
view](https://www.django-rest-framework.org/api-guide/generic-views/) and
making my changes after saving the object.
On Sunday, February 10, 2019 at 8:34:44 AM UTC-5, Nick Emery w
The child objects are created separately beforehand with NULL parents (they
don't have to have parents, they can be orphans). One other thing I noticed
is that looking at the SQL statements executed by my app I can't even see
the UPDATE on the foreign keys of the children (even though I KNOW it'
And how?
On Sun, 10 Feb, 2019, 9:23 PM Shashank Singh When do you create child objects??
>
> On Sun, 10 Feb, 2019, 9:17 PM Nick Emery
>> Tried this too but save() never actually gets called on the child (it
>> seems that the foreign key field of the child is updated at the database
>> level and
When do you create child objects??
On Sun, 10 Feb, 2019, 9:17 PM Nick Emery Tried this too but save() never actually gets called on the child (it
> seems that the foreign key field of the child is updated at the database
> level and never goes through the Django orm Child).
>
> On Sunday, Februar
Tried this too but save() never actually gets called on the child (it seems
that the foreign key field of the child is updated at the database level
and never goes through the Django orm Child).
On Sunday, February 10, 2019 at 8:37:54 AM UTC-5, Shashank Singh wrote:
>
> Override the save() of th
Override the save() of the child?
On Sun, 10 Feb, 2019, 7:04 PM Nick Emery I am trying to wrap up my first app using Django (specifically Django
> Rest Framework which may change the save behavior), but have run into an
> issue that I haven't been able to solve for about 10 hours now.
>
> I am tr
I am trying to wrap up my first app using Django (specifically Django Rest
Framework which may change the save behavior), but have run into an issue
that I haven't been able to solve for about 10 hours now.
I am trying to override the save() method of a model to modify a field on a
bunch of chi
Hey,
I am trying to solve following problem and I got stuck. Any help is
appreciated...
I have two models which represent a product and its parts.
class Product(models.Model):
name = models.CharField(max_length=200)
average_daily = models.FloatField(default=0)
average_monthly = models.Inte
Le 17/05/2016 16:18, David Xiao a écrit :
Hi Florian,
That's technically correct, but the universe of all possible items
might be very large or even infinite so it's not really practical to
do it that way.
I understand, but i don't now your case precisely. In my case, i do this
for a few t
Hi Florian,
That's technically correct, but the universe of all possible items might be
very large or even infinite so it's not really practical to do it that way.
Dave
On Tue, May 17, 2016 at 9:32 AM florian wrote:
>
>
> Le mardi 17 mai 2016 14:04:28 UTC+2, David Xiao a écrit :
>>
>> Hi Vitor,
Le mardi 17 mai 2016 14:04:28 UTC+2, David Xiao a écrit :
>
> Hi Vitor,
>
> Sorry I realized that my example should have used a ManyToManyField
> instead of a 1-to-many. Let me try again:
>
> class Bundle(Model)
> items = ManyToManyField("Item")
>
> class Item(Model)
> pass
>
> (So one item
Hi Vitor,
Sorry I realized that my example should have used a ManyToManyField instead
of a 1-to-many. Let me try again:
class Bundle(Model)
items = ManyToManyField("Item")
class Item(Model)
pass
(So one item can belong many Bundles and one Bundle can have many Items.)
Suppose I've create
Hi David,
Perhaps you can try using *exclude *instead of *filter*:
https://docs.djangoproject.com/en/1.9/topics/db/queries/#retrieving-specific-objects-with-filters
But wasn't 100% clear for me what you are trying to achieve, so I don't
know if the following query will be give you the desired res
Django is missing the "not in" operator and I have a situation where the
workarounds (using ~Q or using exclude) don't seem to give a satisfactory
solution.
Suppose I have two models:
from django.db.models import Model, ForeignKey
class Bundle(Model):
pass
class Item(Model):
bundle = Forei
Field(auto_now_add=True, blank=True)
update_ts = models.DateTimeField(auto_now_add=True, blank=True)
Now I was required to update this membership using django rest framework. I
tried update those using Writable nested serializers
<http://www.django-rest-framework.org/api-guide/relation
Each product is only associated with one category, so you can only do
produto.categoria
If you want to iterate over all categories, and then through the products
of each category, you could do
{% for categoria in categorias %}
{% for produto in categoria.produto_set.all %}
do comething with prod
>
> I try to use
>>
>> {% if categorias %}
>>
>> {% for categoria in produto.categoria_set() %}
At no time can parentheses be used when referencing variables. The correct
way to write this tag would be {% for categoria in produto.categoria_set %
Hello everybody!
I'm new on this forum and in django.
I'm using Python 2.7 environment.
I have the following models.py:
class Categoria(models.Model):
>
> DEFAULT_CATHEGORY = 0
> nome = models.CharField(max_length=255, null=False, default='0')
>
> def __unicode__(self):
> retu
Le lundi 30 mars 2015 14:31:19 UTC+2, Daniel Roseman a écrit :
>
>
> On Monday, 30 March 2015 13:04:00 UTC+1, François GUÉRIN wrote:
>>
>> Hi all,
>>
>> I'm using django for a couple of years, and I've a question about
>> relations in the ORM a
On Monday, 30 March 2015 13:04:00 UTC+1, François GUÉRIN wrote:
>
> Hi all,
>
> I'm using django for a couple of years, and I've a question about
> relations in the ORM and templates. I massively use class-based generic
> views.
>
> I' currently wor
Hi all,
I'm using django for a couple of years, and I've a question about relations
in the ORM and templates. I massively use class-based generic views.
I' currently working with a model which have many other models FKing to it
:
class People(models.Model):
last_name = m
no attribute 'object_id'
>
*Why i think this may be a bug?*
Because of the error. Normally if *prefech_related* can't resolve a relation it
complains like that:
AttributeError: Cannot find 'some_field' on TaggedItem object, 'some_field'
> is an invalid pa
>
> "permissions": [],
>
> "public": false,
>
> "users": []
>
> }
>
> }
>
>
>
I can't use this fixture as it's referencing an object ID. How do I use
natural keys when dumping/loading fixtur
I have a table, Credit, that I want to query based on a value several hops
away. There's a CreditLineItems that has a Generic Foreign Key to one of
two tables, each of which has a Foreign Key to the table I want to search.
I've not as yet setup a reverse relation in the related tables.
My question
How about posting both models.py from galleryview and event to something
like https://gist.github.com/ ?
Maybe we can work from there.
Cheers,
AT
On Mon, Sep 2, 2013 at 2:07 PM, Bobby Roberts wrote:
> i tried doing that and now get this error:
>
> Error: One or more models did not validate:
i tried doing that and now get this error:
Error: One or more models did not validate:
galleryview.galleryphoto: Accessor for field 'GalleryId' clashes with
related field 'Gallery.Gallery_Id'. Add a related_name argument to the
definition for 'GalleryId'.
galleryview.galleryphoto: Reverse query
thanks for the info... yes the name is funny for the model isn't it? I try
to write confusing code.
Always test in production
On Monday, September 2, 2013 12:24:41 PM UTC-4, Bobby Roberts wrote:
>
> I'm creating an event module and want people to be able to associate a
> picture gallery with
As per the current docs[0], you need to provide a dotted path to your model
in the form app.ModelName when defining a ForeignKey.
So try this instead:
GalleryId = models.ForeignKey('galleryview.Gallery',
verbose_name=_('Gallery Id'), related_name='Gallery_Id',blank=True,
null=True, help_text=_("Y
I'm creating an event module and want people to be able to associate a
picture gallery with the event:
from django.utils.translation import get_language, ugettext, ugettext_lazy
as _
from django.contrib import admin
from django.db import models
from django.contrib.auth.models import User
from
Hi Tom,
On Wednesday, June 12, 2013 10:25:24 AM UTC+2, Tomáš Ehrlich wrote:
>
> Hi Benjamin,
> you can create explicit OneToOne field with parent_link=True
>
> https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.OneToOneField.parent_link
>
>
> Then you can set different r
)
Benjamin Wohlwend napsal(a):
> Hi,
>
> I have a bit of a problem with inherited reverse relations and django model
> inheritance. Consider these models:
>
>
> class Content(models.Model):
> display = models.BooleanField()
>
>
> class Link(Content):
> u
Hi,
I have a bit of a problem with inherited reverse relations and django model
inheritance. Consider these models:
class Content(models.Model):
display = models.BooleanField()
class Link(Content):
url = models.URLField()
class Teaser(Content):
text = models.TextField
@googlegroups.com
Subject: Relations to unknown models?
Hi.
I'm looking for a solution to make site-wide comments that can be connected
with different models via FK.
I want to make 1 global model Comments. I want to make a relation to
Articles, Relations and Solutions models. I the future I plan t
Hi.
I'm looking for a solution to make site-wide comments that can be connected
with different models via FK.
I want to make 1 global model Comments. I want to make a relation to
Articles, Relations and Solutions models. I the future I plan to add
additional models. Now, Comments model s
Solution:
http://pastebin.com/011WsfzD
Regards.
On 15 maio, 23:43, Guevara wrote:
> Hi all!
>
> I need a required true in Generic Relations.
> Have this code:
>
> # Models
> class Client(Person):
> addresses = GenericRelation(Address)
>
> class Address(model
Hi all!
I need a required true in Generic Relations.
Have this code:
# Models
class Client(Person):
addresses = GenericRelation(Address)
class Address(models.Model):
# others fields
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField
Just an update, the following got me on the right track.
http://blog.roseman.org.uk/2010/02/22/django-patterns-part-4-forwards-generic-relations/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web vi
I am trying to abstract a log app that I have made for my project to make
it more DRY. In order to achieve this I have tried to implement Generic FKs
class Modification(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_obje
On Apr 23, 8:15 am, Aditya Sriram M wrote:
> Ohh this looks little promising..
>
> However,
>
> 1. I need a few cols of table1 and few from table 2 to be displayed. How
> can we achieve that at the .filter() level? and
> 2. At the view level like using the list_display () for displaying t
Ohh this looks little promising..
However,
1. I need a few cols of table1 and few from table 2 to be displayed. How
can we achieve that at the .filter() level? and
2. At the view level like using the list_display () for displaying them
in the Admin interface
On Sunday, 22 April 2
On Apr 22, 1:31 pm, Aditya Sriram M wrote:
> File myapp/models.py has this sample code..
>
> from django.db import models
>
> # model for 'user' table in database oracle_dbuser1:user
> class User(models.Model):
> . . .
> customerid = models.BigIntegerField()
>
> # model for 'customer' tabl
File myapp/models.py has this sample code..
from django.db import models
# model for 'user' table in database oracle_dbuser1:user
class User(models.Model):
. . .
customerid = models.BigIntegerField()
# model for 'customer' table in database oracle_dbuser2:customer
# Note that there is
ing the model of the relation with a "through"
> attribute. A little lenghty but effective...
>
> E.
>
> On Jan 12, 11:01 am, "?manu*" wrote:
> > Is it possible to change the column name in many2many relations?
> >
> > I can change in in foreig
I have solved by defining the model of the relation with a "through"
attribute. A little lenghty but effective...
E.
On Jan 12, 11:01 am, "?manu*" wrote:
> Is it possible to change the column name in many2many relations?
>
> I can change in in foreignKeys with t
Is it possible to change the column name in many2many relations?
I can change in in foreignKeys with the db_column attribute. I can
change the table name in many2many relations with db_table. What about
column names in many2many relations?
Thanks,
E.
--
You received this message because you
ls.py
def save(self, *args, **kwargs):
print 'save()'
return
The m2m relations are also saved.
This is a django bug? There any workaround?
On 6 ene, 13:24, Mario8k wrote:
> Hi,
>
> I need to prevent to save a model overriding the ModelAdminsave_model()
> method.
()
else:
if change:
#here i save another model but i never execute
obj.save()
How can I prevent to save m2m relations too? How I can achieve the
original object not be changed?
There is an old thread with the same issue:
http://groups.google.com/group/django-users
using a get or create and so will create
the foreign key if not found but only with the one field. We would
like to do something similar for generic relations and manytomany
fields before moving on to be able to import multiple tables at once.
I'm thinking of possibly matching the object on a
Works perfectly, thanks :) Tested with a join 4 levels deep too and
it made just one query.
I use select_related elsewhere for more generic optimizations but it
hadn't occurred to me that django would need the hint once in
conjunction with an only() call. Perhaps a patch to ensure that the
appro
Hi John,
Use select_related [1] to tell Django to 'follow' the foreign key. Try
the following:
testmodels =
models.ATestModel.objects.all().select_related('other').only('other__name')
print testmodels[0].other.name
Regards,
Alasdair
[1]:
https://docs.djangoproject.com/en/dev/ref/models/qu
Hey,
I'm trying to improve the performance of a Django app, and noticed
that you can't seem to properly defer fields when making lookups with
joins. To demonstrate, I set up a test project with the following
models:
class ATestModel(models.Model):
other = models.ForeignKey('OtherModel')
cla
> So you want to edit the User object through the ModelForm of the other model,
> or you just want to display it?
>
I want to edit the User object through the ModelForm.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
So you want to edit the User object through the ModelForm of the other
model, or you just want to display it?
--
eng. Ilian Iliev
Web Software Developer
Mobile: +359 88 66 08 400
Website: http://ilian.i-n-i.org
On Tue, Sep 20, 2011 at 4:37 PM, Jonas Geiregat wrote:
>
> > Hi,
> >
> > ModelFo
> Hi,
>
> ModelForm should automatically create a dropdown list for your foreign key.
> If there is nor such drop-down created probably you are doing something wrong.
>
I don't want the dropdown list I want the values of the foreinkey to be
expaneded into fields
For example I have user as For
Hi,
ModelForm should automatically create a dropdown list for your foreign key.
If there is nor such drop-down created probably you are doing something
wrong.
--
eng. Ilian Iliev
Web Software Developer
Mobile: +359 88 66 08 400
Website: http://ilian.i-n-i.org
On Tue, Sep 20, 2011 at 1:26 PM,
Hello,
I have a UserProfile model:
class UserProfile(FacebookProfileModel):
user = models.ForeignKey(User, unique=True)
lastf
asp I would have nested iterations a and created a matrix of
text boxes and built the insert statement from that.
But I have a strong feeling that this has a much simpler solution
using the philosophy of Django.
Can I define ManyToMany relations to many tables like in this case?
What is the right term
ease tell, what kind of relations is required to store
> user's membership in multiple groups to be able to recover:
>
> 1. history of user participation in some groups (date joined, date
> quit)
> 2. list of current user groups (in join order) to determine his
> current s
Hi.
Can someone please tell, what kind of relations is required to store
user's membership in multiple groups to be able to recover:
1. history of user participation in some groups (date joined, date
quit)
2. list of current user groups (in join order) to determine his
current status
Hi everyone,
We are developing a webapp using Django. We have found a problem with
m2m relations.
I will Expose a simplified example of the problem; say we have 2 classes:
class A(models.Model):
name = models.CharField(max_length = 128, default="", blank =
True,
> Dear experts,
>
> today I was inspecting the ManyToMany relations in the _meta subclass
> of a Model class of my database. At some time I realized that all data
> associated to such relations was lost in the database! The
> corresponding tables are empty. Other fields and relat
Dear experts,
today I was inspecting the ManyToMany relations in the _meta subclass
of a Model class of my database. At some time I realized that all data
associated to such relations was lost in the database! The
corresponding tables are empty. Other fields and relations are ok.
I suspect I
On Tue, Apr 19, 2011 at 7:28 PM, Jacob Kaplan-Moss wrote:
> 2011/4/19 Juan Pablo Romero Méndez :
> > Is it possible to create unidirectional relations within django's orm?
> >
> > What I mean is a situation where a parent has a children_set of
> > references to
I think you would need an intermediate table 1:n with the parent containing the
child ids. Otherwise the children need a foreign key reference to the parent.
On 20/04/2011, at 10:06 AM, Juan Pablo Romero Méndez
wrote:
> Hello,
>
> Is it possible to create unidirectional relatio
2011/4/19 Juan Pablo Romero Méndez :
> Is it possible to create unidirectional relations within django's orm?
>
> What I mean is a situation where a parent has a children_set of
> references to children, but the children don't have any reference to
> the father.
Hello,
Is it possible to create unidirectional relations within django's orm?
What I mean is a situation where a parent has a children_set of
references to children, but the children don't have any reference to
the father.
Regards,
Juan Pablo
--
You received this message becau
On Tue, Jan 11, 2011 at 2:30 PM, Matias Aguirre wrote:
> So, basically you want this:
>
> C.objects.filter(Bref__Dref__id=D_id).values_list('Aref')
>
Thanks! it was exactly what I needed
--
Gianluca Sforna
http://morefedora.blogspot.com
http://identi.ca/giallu - http://twitter.com/giallu
--
So, basically you want this:
C.objects.filter(Bref__Dref__id=D_id).values_list('Aref')
Matías
Excerpts from gia...@gmail.com's message of Tue Jan 11 07:58:05 -0200 2011:
> Let's say I have a model like:
>
> class A:
>
> class B:
> Dref = ForeignKey('D')
>
> class C:
> Aref = ForeignKey('A'
Let's say I have a model like:
class A:
class B:
Dref = ForeignKey('D')
class C:
Aref = ForeignKey('A')
Bref = ForeignKey('B')
class D:
I also have a view taking a D_id parameter and in this view I would
like to create and show the list of A objects that are related to D
through the B a
fields will be handled by the generic relation API.
On Dec 6, 4:34 am, bruno desthuilliers
wrote:
> On 5 déc, 20:30, mack the finger wrote:
>
> > I can't quite wrap my brain around how to do generic relations. I have
> > a `Receipt` model which is a receipt of a purchase.
On 5 déc, 20:30, mack the finger wrote:
> I can't quite wrap my brain around how to do generic relations. I have
> a `Receipt` model which is a receipt of a purchase. One of the fields
> is `item` which is a foreign key to a product model. I want to be able
> to not only have pr
I can't quite wrap my brain around how to do generic relations. I have
a `Receipt` model which is a receipt of a purchase. One of the fields
is `item` which is a foreign key to a product model. I want to be able
to not only have products, but other things that the user can buy.
What do I ne
That was it!
After running:
./manage.py sqlclear foo | ./manage.py dbshell && ./manage.py syncdb
it works!
So something in my db was inconsistent!
Thanks!
Op 18-nov-2010, om 09:57 heeft Marc Aymerich het volgende geschreven:
> On Thu, Nov 18, 2010 at 12:00 AM, Jonas Geiregat wrote:
>>
>> Op
On Thu, Nov 18, 2010 at 12:00 AM, Jonas Geiregat wrote:
>
> Op 17-nov-2010, om 23:46 heeft Marc Aymerich het volgende geschreven:
>
> GenericPost.objects.get(pk=1).content_object.content
>
>
> That's the strange thing. It just doesn't work:
>
> Some code:
>
>
> In [3]: GenericPost.objects.get(
Op 17-nov-2010, om 23:46 heeft Marc Aymerich het volgende geschreven:
GenericPost.objects.get(pk=1).content_object.content
That's the strange thing. It just doesn't work:
Some code:
In [3]: GenericPost.objects.get(pk=1).content_object
In [4]: GenericPost.objects.get(pk=1).content_objec
On Wed, Nov 17, 2010 at 11:46 PM, Marc Aymerich wrote:
> On Wed, Nov 17, 2010 at 11:36 PM, Jonas Geiregat wrote:
>> Hello,
>>
>> Can I use django's generic relations to create a model (GenericPost) that
>> can point to other model (APost) or model (Rev
On Wed, Nov 17, 2010 at 11:36 PM, Jonas Geiregat wrote:
> Hello,
>
> Can I use django's generic relations to create a model (GenericPost) that
> can point to other model (APost) or model (ReviewPost) ?
> And then use this GenericPost model to get a list of al
Hello,
Can I use django's generic relations to create a model (GenericPost) that can
point to other model (APost) or model (ReviewPost) ?
And then use this GenericPost model to get a list of all latest APost's and
ReviewPost's ?
I've been trying this all day long but I
With update I also meant adding a new author to the publications in
the queryset. This (http://docs.djangoproject.com/en/dev/topics/db/
queries/#updating-multiple-objects-at-once) shows only how to update
usual fields, but no m2m Relations as I understand it. I want to add
objects. For
On Mon, Oct 18, 2010 at 8:49 PM, Marc Aymerich wrote:
>
>
> On Mon, Oct 18, 2010 at 6:31 PM, brix wrote:
>
>> Hello.
>>
>> Assume I have publications and authors. Like here:
>> http://www.djangoproject.com/documentation/models/many_to_many/
>>
>> Now I want to add authors to more than just one p
On Mon, Oct 18, 2010 at 6:31 PM, brix wrote:
> Hello.
>
> Assume I have publications and authors. Like here:
> http://www.djangoproject.com/documentation/models/many_to_many/
>
> Now I want to add authors to more than just one publication. Lets say
> 1000 or more publications.
>
> Is there a more
Hello.
Assume I have publications and authors. Like here:
http://www.djangoproject.com/documentation/models/many_to_many/
Now I want to add authors to more than just one publication. Lets say
1000 or more publications.
Is there a more efficient way of adding the authors once for each
publication
1 - 100 of 423 matches
Mail list logo