Also/maybe if you haven't please check
https://django-import-export.readthedocs.io/en/latest/
On Thu, May 5, 2022 at 3:59 PM 'David Turner' via Django users <
django-users@googlegroups.com> wrote:
> We receive the data every two weeks and then use django-import-export to
> import the data into ou
It shouldn’t impact cause you can set that field to be (blank=True,
null=True) in this case it won’t raise an error and you can attach the
imported data to the related account manager.
This is how I see it I hope this helps
On Thu, 05 May 2022 at 15:59, 'David Turner' via Django users <
django-use
We receive the data every two weeks and then use django-import-export to import
the data into our database. There is no mention of the account manager in these
as this is something on our side. Am I missing the point in that by having the
foreign key to the account manager this would impact on t
To help understand more the problem, would you please explain why adding an
extra field to your models to be used as a foreign key, is not an option?
On Thu, 05 May 2022 at 15:36, 'dtdave' via Django users <
django-users@googlegroups.com> wrote:
> We receive data from various third parties in the
i would decouple the importing of data from the database architecture, and
make a meaningfould structure of the models, but your own, not the one of
the client. In this manner you create a design that is meaningful and can
be scaled from the knowledge expressed in the data without being dependant
f
Thanks for the feedback!
For James, the reference to MongoDB is very interesting. The more I looked
into MongoDB, I am thinking it is just what I need for this project, since
the db stuff is still so fluid.
There is (was?) a django interface for MongoDB, at https://django-mongodb-
engine.readthed
On Dec 16, 2017 4:46 PM, "Mark Phillips" wrote:
I am building an electronic document management system using django and
mysql. The purpose of this system is to catalog and retrieve electronic
documents. There is no inventory of the physical documents. There are about
3,000 documents (photos, pdfs
Hi,
As suggested using Postgres as a database backend would give you first
class support for JSON field with ability to query by attributes in JSON
data.
See
https://docs.djangoproject.com/en/2.0/ref/contrib/postgres/fields/#jsonfield
for more info.
17.12.2017 2.46 "Mark Phillips" kirjoitti:
I use https://github.com/dmkoch/django-jsonfield for storing metadata and
works very well, the only problem that I see in using one jsonfield for all
the metadata you have for a document is searching (which I don't need).
3k, 6k or 9k of rows is "nothing" for MySQL or Postgres, a bottleneck won't
If you switched to Postgres you could use a json data type or dictionary
data type. Django 1.11 onwards supports the storage and retrieval of both
types I believe.
Dan
On Sun, 17 Dec 2017 at 07:46, Mark Phillips
wrote:
> I am building an electronic document management system using django and
>
On Sun, Jun 25, 2017 at 6:56 PM, Constantine Covtushenko <
constantine@gmail.com> wrote:
> Hi Mark,
>
> I have some questions to you.
> 1. Does any of MetaData have predefined list of MetaDataValues?
>
No, I want to add them in real time as Documents are uploaded.
> 2. Can MetaDataValue be
Hi Mark,
I have some questions to you.
1. Does any of MetaData have predefined list of MetaDataValues?
2. Can MetaDataValue be assigned to many Documents or it is specific to
particular Document?
Regards,
Constantine C.
On Sun, Jun 25, 2017 at 6:20 PM, Mark Phillips
wrote:
> I have a class Doc
Why not have separate models for Event and Season and then use an
intermediate table to capture the M2M between event occurrences and Person.
On Thu, Apr 24, 2014 at 12:43 AM, Christopher Grande wrote:
> I'm in the process of designing an internal system and I'm having trouble
> designing the mo
Thanks Daniel!
I try to always RTFM, but this slipped by me.
On Thu, Nov 21, 2013 at 5:32 AM, Daniel Roseman wrote:
> On Wednesday, 20 November 2013 22:49:28 UTC, Thomas Murphy wrote:
>>
>> Hi all,
>>
>> I'm working on a hour-reporting system.
>>
>> Each Project has many Users, and each User has
On Wednesday, 20 November 2013 22:49:28 UTC, Thomas Murphy wrote:
>
> Hi all,
>
> I'm working on a hour-reporting system.
>
> Each Project has many Users, and each User has many Projects(These are
> established and working nicely).
>
> My design issue is this:
> How can I assign each User an I
Mike, Anssi,
Thank you for your replies. I will give this a shot and see if I can get
it to work.
Sam
On Thursday, May 17, 2012 9:59:40 PM UTC-7, akaariai wrote:
>
> On May 18, 5:25 am, oneroler wrote:
> > Thanks Mike, that is what I was originally planning to do but realized
> > there woul
On May 18, 5:25 am, oneroler wrote:
> Thanks Mike, that is what I was originally planning to do but realized
> there would be situations where that wouldn't do exactly what I wanted.
> For example, if there is a business that only has the strategy 'wholesale'
> assigned, using ForeignKey would sti
On 18/05/2012 12:25pm, oneroler wrote:
Thanks Mike, that is what I was originally planning to do but realized
there would be situations where that wouldn't do exactly what I
wanted. For example, if there is a business that only has the
strategy 'wholesale' assigned, using ForeignKey would stil
Thanks Mike, that is what I was originally planning to do but realized
there would be situations where that wouldn't do exactly what I wanted.
For example, if there is a business that only has the strategy 'wholesale'
assigned, using ForeignKey would still allow me to assign a different
strate
On 18/05/2012 7:02am, oneroler wrote:
I'm trying to setup my first app and I'm trying to figure out the best
way to have constraints on a particular field (strategy for class
Division noted below). Below is the basic model structure. What I
would like is for the strategy under a Division to b
Visual paradigm is nice, and free for personal use.
On May 23, 11:05 am, Jon wrote:
> Hello,
>
> Trying to include some graph tool for managing and sharing data models
> visually.
>
> Testes mysql workbench, dia, graphivz and recently read some about
> argoUML..
>
> ¿Do you know and recommend any
On 2 Lut, 16:06, Simon Davies wrote:
> Hi
>
> I am writing a web shop. I have a shopping cart class, which has a
> many to many relationship to an item class, the item class has three
> derived classes. The basic schema is shown below:
>
> class Item(models.Model):
> title = models.CharF
Or there's overriding the metaclass...
On Mon, Dec 7, 2009 at 12:39 PM, Bill Freeman wrote:
> Hmmm. Probably just as ugly, and untested, but:
>
> class A(basemodel):
> for o in range(MAXNUMREDPORTS):
> for i in (1,2):
> locals()["Port%d_redfield%d" % (o+1, i)] = models.Flo
Hmmm. Probably just as ugly, and untested, but:
class A(basemodel):
for o in range(MAXNUMREDPORTS):
for i in (1,2):
locals()["Port%d_redfield%d" % (o+1, i)] = models.FloatField()
...
On Mon, Dec 7, 2009 at 12:10 PM, Daniel Goertzen
wrote:
> Okay, I explored model gener
Unless I'm very confused, django will happily delete your related
objects (since they
don't have anything to relate to anymore). Many to many would be more
problematic.
As far as creating a set of ports, you were stuck with that anyway, if
I understand
your original approach correctly. Even if y
On Dec 7, 8:56 am, Daniel Goertzen wrote:
> Thanks for the reply Bill. The problem I had with that approach is that
> after creating the product I have to worry about creating red and green
> ports. Likewise, upon deletion, I have to mop up the ports. Looking
> through the documentation, I di
Okay, I explored model generation a bit and found an approach that wasn't
too offensive. For those that are trying to solve the same problem that I
am, here is what I came up with:
def red_port(prefix):
return """
%(prefix)sredfield1 = models.FloatField()
%(prefix)sredfield2 = models.FloatFie
Thanks for the reply Bill. The problem I had with that approach is that
after creating the product I have to worry about creating red and green
ports. Likewise, upon deletion, I have to mop up the ports. Looking
through the documentation, I did not find a way to bury this behavior in the
Model.
I'm not clear on what you need to store, so I'll assume that you have individual
data to store for each port of each type, and it is unrelated to data stored for
another instance of the same or a different product.
What comes to mind is that there is a "Product" model and a "Port" model (or if
red
Each port would have about a half-dozen fields, and different port types are
totally different from one another. I won't be querying port fields.
I've thought about your JSON field trick before, but not with the nice
wrapper methods. Good idea, thanks!
The solution does have flaws, but if nothi
What kind of information will the database have to store about the ports
themselves?
How will you need to be able to filter querysets by information in the port
fields, if at all?
I'm going to throw this one solution out there, but depending on your needs it
may not fit:
Create a red_ports co
Dear Vinicius,
What is the difference between:
--
def __unicode__(self):
return unicode(self.place)+' - '+self.nome
--
and
--
def __unicode__(self):
return self.place+' - '+self.nome
--
because the both seem to work and display the same inf
On Oct 25, 11:47 pm, Caisys wrote:
> Thanks but I am not very familiar with forms yet I barely managed to
> override the default form.
> However, I thought that its ok for the time being since places and
> subplaces are not changed frequently so i can live with it for the
> time being and move to
def __unicode__(self):
return unicode(self.place)+' - '+self.nome
On Oct 25, 8:47 pm, Caisys wrote:
> Thanks but I am not very familiar with forms yet I barely managed to
> override the default form.
> However, I thought that its ok for the time being since places and
> subplaces are not cha
Thanks but I am not very familiar with forms yet I barely managed to
override the default form.
However, I thought that its ok for the time being since places and
subplaces are not changed frequently so i can live with it for the
time being and move to more important parts until I am more familiar
On Oct 25, 4:53 am, Caisys wrote:
> > Just override the form in the inlne admin. All you have to do is set a
> > default in the field you want.
>
> I managed to do that but now all the extra fields have the default
> text not just one.
>
What about overriding the formset? You override the __init
> Just override the form in the inlne admin. All you have to do is set a
> default in the field you want.
I managed to do that but now all the extra fields have the default
text not just one.
> In this case i prefer the approach of creating a "fake" field called
> places, populated with the plac
On Oct 24, 7:14 am, Caisys wrote:
> Thanks !!! I also felt the second sounds more "right" which leads to
> two requirements, the first is for convenience but the second is a
> must:
>
> 1) On the admin page for add Place I will put 2 or 3 slots for adding
> Subplace to a place ... is there a wa
Thanks !!! I also felt the second sounds more "right" which leads to
two requirements, the first is for convenience but the second is a
must:
1) On the admin page for add Place I will put 2 or 3 slots for adding
Subplace to a place ... is there a way where the first one would be
filled with "defa
The second sounds more logically.
On 23 Okt., 15:41, chefsmart wrote:
> I would go with your second solution.
>
> On Oct 23, 5:17 pm, Caisys wrote:
>
>
>
> > Hi,
> > I have classes for Event, Place and Subplace. Some of the Places are
> > divided into different Halls (Subplace) and some have on
I would go with your second solution.
On Oct 23, 5:17 pm, Caisys wrote:
> Hi,
> I have classes for Event, Place and Subplace. Some of the Places are
> divided into different Halls (Subplace) and some have only one. I
> would like to know how design the relations between the classes.
>
> 1) Shoul
The true relational way would be to have another Model called
JobRunParameter with an FK on Parameter. It's getting a bit silly though and
all these look-ups are going to be a pain later on.
If Parameter is just a string key/value style thing, I might have simplified
things a little and instead of
On 7/28/07, Cole Tuininga <[EMAIL PROTECTED]> wrote:
> I could do something like a simple many to many relationship in the
> attendee model, but that doesn't indicate ordering (most preferred to
> least preferred) per timeslot.
You might want to look at thisL
http://www.djangoproject.com/documen
When you use a ManyToMany field, a "private" table (not tied to a
model like other tables) is created in the database with something
like the following (created via the contrib.auth.User's
user_permissions field:
id, user_id, permission_id
If you wanted to create your own table that mirrors this
On 25 juil, 14:49, Tim Chase <[EMAIL PROTECTED]> wrote:
> When you add a foreign-key to your model, the referenced model
> gets a psedudo-attribute, usually called _set which is
> the set of s that have this attribute. By adding the
> related_name, you provide a way to reference the Units for whi
>>responsable = models.ForeignKey('Personne', ...)
>>
>> if you need to forward-reference a model that hasn't yet been
>> defined.
>
> thanks for the anwser.
> I dont saw this particular sentence.
The magic is in the phrase "If you need to create a relationship
on a model that has not yet b
>
>responsable = models.ForeignKey('Personne', ...)
>
> if you need to forward-reference a model that hasn't yet been
> defined.
thanks for the anwser.
I dont saw this particular sentence.
But now I have this message:
directory.unite: Reverse query name for field 'responsable' clashes
with
> I like to do something like that in a app models.py:
>
>
> class Unite(models.Model):
> responsable = models.ForeignKey(Personne, verbose_name='The
> Chief', blank=True)
> ...
>
> class Personne(models.Model):
> unite = models.ForeignKey(Unite,null=True)
>
>
>
> And I h
48 matches
Mail list logo