Re: Recover admin username and password

2023-08-03 Thread wongX Ndeso
Just login to your server, activate the environment and run createsuperuser
to create new superuser account

On Thu, Aug 3, 2023, 14:56 Safaet Jaman  wrote:

> I've delete my user admin. I've another two user but i can't login django
> admin pannel to use these. [image: Screenshot from 2023-08-03
> 13-55-22.png]
>
> --
> 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://groups.google.com/d/msgid/django-users/bdaaab42-6f29-45ed-99b3-9b05b62588b6n%40googlegroups.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJXStANyauMHdrvOP9_C1DdFf-Ty%2BZy%2BaUQmQ4Tw3w%2BFnw%40mail.gmail.com.


Re: How to get Dependent Dropdown Feilds in Django ModelForms. Please answer : Important

2020-06-07 Thread wongX Ndeso
You can use django form wizard if you want, much easier than you should
manipulate the onclick event using javascript or something similar with
that..
Maybe you should remodel your form or the flow.. Hope this help


On Sun, Jun 7, 2020, 1:34 PM Sai  wrote:

> Hi guys,
> I am working on a* Django project,* which involves submission form and
> saving the data in the database using model form.  I am stuck with one of
> the functionalities of form which should work like for example "do you want
> benefit plan: *YES,* *next Field options should pop up*. if click* NO,
> nothing should happen* and move to the next question."
>
> I went through all over the internet and found the dependent drop-down
> select option but not like field pop up as we click through te form.
>
> Please let me know how to achieve this in a clear way as I am new to
> Django and programming as well.
>
> Thank You so much in advance.
>
> --
> 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://groups.google.com/d/msgid/django-users/0c8d8457-b2d8-4598-aa0d-b9b05e817722o%40googlegroups.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJUBQZHVN9%3DBBQJkPy1iMd%3D0mE7rOQjwWb4U%2BdwBo3Jd0g%40mail.gmail.com.


Re: Error in to save data in DB using Django ORM

2020-06-07 Thread wongX Ndeso
Well, can you send the error message? It's important before i answer your
question

On Sat, Jun 6, 2020, 11:48 PM Ganesh Prajapat  wrote:

> hello,
> I have a problem in my project.
> basically scenario is i have 3 classes in
> models.py(Subject,Exam,Registration).
> Subject class have 2 field(subject_name,subject_code,id(pk)).
> Exam class have 3 field(exam_name,exam_code(pk),subject_of_exam(Foreign
> key relation with Subject class)).
> Registration class have also 3
> field(email,password,data_of_exam_id(Foreign key relation with Exam class))
>
> above is all about my code examination.
> Problem is how can i save data in Registration table.I try of the things
> which i know but i can't save data in Registration table.
> so if anybody know how save data in Registration table please suggest me.
> Thank-you.
>
> --
> 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://groups.google.com/d/msgid/django-users/0bb28b7a-f886-45bc-a76b-eaaa012f0773o%40googlegroups.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJXqiUT%3DczA83fSoXku3pWetho-%3DGXDk1ck_oynaJbEh7A%40mail.gmail.com.


Re: problem filtering queryset in Django Rest Framework

2020-06-07 Thread wongX Ndeso
Try change this,
If self.kwargs[field] is not None:
With
if self.kwargs[field]: <--- this will return True it the field is not empty
This is the better way to filter, if you want filter the fields is empty
then just add not like this example
if not self.kwargs[field]:

On Sun, Jun 7, 2020, 1:06 AM Agnese Camellini 
wrote:

> Hello to everyone,
> i have a viewset (ModelViewset) for a model in my views.py, and i would
> like the list endpoint to list me things matching some parameters (but the
> are optional). So i have built this mixin:
>
> class MultipleFieldLookupMixin(object):
> """
> Apply this mixin to any view or viewset to get multiple field filtering
> based on a `lookup_fields` attribute, instead of the default single
> field filtering.
> """
> def get_object(self):
> queryset = self.get_queryset() # Get the base queryset
> queryset = self.filter_queryset(queryset)  # Apply any filter
> backends
> filter = {}
> for field in self.lookup_fields:
> if self.kwargs[field] is not None: # Ignore empty fields.
> filter[field] = self.kwargs[field]
> obj = get_object_or_404(queryset, **filter)  # Lookup the object
> return obj
>
>
> class UserView(MultipleFieldLookupMixin, viewsets.ModelViewSet):
> queryset = User.objects.all()
> serializer_class = UserSerializer
> lookup_fields = ['username', 'pwd', 'token_confirm', 'email',
> 'token_cng_pwd']
>
> This is what my view.py looks like.
> However the list view doesn't filter object at all, so i am missing
> something important.
>
> Can anyone help me out or point me in the right direction?
>
> Thanks a lot
> Agnese Camellini
>
> --
> 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://groups.google.com/d/msgid/django-users/CACXuh-Siku2%2BES0RxCDfWe3NVRTnt3%3DBToj2ZFYB%2BbT1sBVCBg%40mail.gmail.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJX0G%3DNxgoiBm3r2K5gv54Mz%3DAeSXoXf2a5UokjzkMVazg%40mail.gmail.com.


Re: django tables 2 - delete column and delete_item for inherited tables

2020-06-07 Thread wongX Ndeso
Try django generic edit view (CBV).
You can use DeleteView Class to perform what you need to do..

On Sat, Jun 6, 2020, 3:48 AM Nader Elsisi  wrote:

> I have just posted
>
>
> https://stackoverflow.com/questions/62218886/django-tables-2-delete-column-and-delete-item-for-inherited-tables
>
>
> and didn't get any feedback yet. So I appreciate anyone who can help me
>
> about passing data.
>
>
> I want to have one abstract function for all my tablelists (one for each
> model) and (one delete_item) function in view.
>
> I don't know how to make the delete (column in this table) and pass the
> model to the delete_item function in the view
>
> *Tables.py*
>
>
>  Abstract Table
> class abs_Table(tables.Table):
>
> SN = tables.Column(empty_values=(), orderable=False)
> delete = tables.LinkColumn('delete_item', args=[A('pk'), ?Model???],  
> attrs={
>  'a': {'class': 'btn btn-small btn-dark'}
> # })
>
>
> def __init__(self, *args, **kwargs):
> super(abs_Table, self).__init__(*args, **kwargs)
> self.counter = itertools.count(1)
>
>
> def render_SN(self, record):
>
> pg = getattr(self, 'paginator', None)
> if pg:
> v = next(self.counter)
> return v + self.paginator.per_page * (self.page.number-1)
> else:
> return next(self.counter)
>
>
> class Meta:
> model = None
> fields = [ 'SN', 'id',  'delete', ]
>
> attrs = {"class": "table-striped table-bordered", 'width': '100%'}
> empty_text = "There are no Records matching the search criteria..."
>
> Then for model Table
>
> *Tables.py*
>
>
> class ModelTable(abs_Table):
>
>
> class Meta(abs_Table.Meta):
> model = modelname
> fields = abs_Table.Meta.fields+[selected_model_fields]
>
> *Views.py*
>
>
>
>   def delete_item(request, pk, delmodel):
> obj = get_object_or_404(delmodel, id=pk)
>
>
> if request.method == "POST":
>
> obj.delete()
>
> return redirect("../")
> else:
> pass
>
>
> context = {
> 'object': obj
> }
>
> return render(request, '/delete_confirmation.html', context)
>
>
> --
> 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://groups.google.com/d/msgid/django-users/CA%2BkREvqnPgZ9z9j93PVd32F6dGcdtFe1dNuPkA--qx6YecJEOQ%40mail.gmail.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJWUvwyMpsVCepg_ToZqbo3SjP2cuRJ4HR3hyCsVxVtEyw%40mail.gmail.com.


Re: django tables 2 - delete column and delete_item for inherited tables

2020-06-07 Thread wongX Ndeso
If you use django to perform some delete action, or others like create or
update, please make sure you have csrf_token in your html form file, and
then you should filter if the form is valid or not, then you can process
the data that send from delete page.


On Sat, Jun 6, 2020, 3:48 AM Nader Elsisi  wrote:

> I have just posted
>
>
> https://stackoverflow.com/questions/62218886/django-tables-2-delete-column-and-delete-item-for-inherited-tables
>
>
> and didn't get any feedback yet. So I appreciate anyone who can help me
>
> about passing data.
>
>
> I want to have one abstract function for all my tablelists (one for each
> model) and (one delete_item) function in view.
>
> I don't know how to make the delete (column in this table) and pass the
> model to the delete_item function in the view
>
> *Tables.py*
>
>
>  Abstract Table
> class abs_Table(tables.Table):
>
> SN = tables.Column(empty_values=(), orderable=False)
> delete = tables.LinkColumn('delete_item', args=[A('pk'), ?Model???],  
> attrs={
>  'a': {'class': 'btn btn-small btn-dark'}
> # })
>
>
> def __init__(self, *args, **kwargs):
> super(abs_Table, self).__init__(*args, **kwargs)
> self.counter = itertools.count(1)
>
>
> def render_SN(self, record):
>
> pg = getattr(self, 'paginator', None)
> if pg:
> v = next(self.counter)
> return v + self.paginator.per_page * (self.page.number-1)
> else:
> return next(self.counter)
>
>
> class Meta:
> model = None
> fields = [ 'SN', 'id',  'delete', ]
>
> attrs = {"class": "table-striped table-bordered", 'width': '100%'}
> empty_text = "There are no Records matching the search criteria..."
>
> Then for model Table
>
> *Tables.py*
>
>
> class ModelTable(abs_Table):
>
>
> class Meta(abs_Table.Meta):
> model = modelname
> fields = abs_Table.Meta.fields+[selected_model_fields]
>
> *Views.py*
>
>
>
>   def delete_item(request, pk, delmodel):
> obj = get_object_or_404(delmodel, id=pk)
>
>
> if request.method == "POST":
>
> obj.delete()
>
> return redirect("../")
> else:
> pass
>
>
> context = {
> 'object': obj
> }
>
> return render(request, '/delete_confirmation.html', context)
>
>
> --
> 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://groups.google.com/d/msgid/django-users/CA%2BkREvqnPgZ9z9j93PVd32F6dGcdtFe1dNuPkA--qx6YecJEOQ%40mail.gmail.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJUUe3t59Hav99ZD-CaVyvMUCOg4CVr2pC9Yknjyqh8-ZA%40mail.gmail.com.


Re: django tables 2 - delete column and delete_item for inherited tables

2020-06-07 Thread wongX Ndeso
So what you mean is bulk delete?  Is that what you asking?

On Sun, Jun 7, 2020, 6:48 PM Nader Elsisi  wrote:

> Thanks I hope you get what I am asking for. I want to be able to delete
> from the list. Not one object. Also, l want one function for different
> models.
> I am doing it now but I need to improve it. So l asked for help.
>
> On Sun, Jun 7, 2020, 6:40 AM wongX Ndeso  wrote:
>
>> If you use django to perform some delete action, or others like create or
>> update, please make sure you have csrf_token in your html form file, and
>> then you should filter if the form is valid or not, then you can process
>> the data that send from delete page.
>>
>>
>> On Sat, Jun 6, 2020, 3:48 AM Nader Elsisi  wrote:
>>
>>> I have just posted
>>>
>>>
>>> https://stackoverflow.com/questions/62218886/django-tables-2-delete-column-and-delete-item-for-inherited-tables
>>>
>>>
>>> and didn't get any feedback yet. So I appreciate anyone who can help me
>>>
>>> about passing data.
>>>
>>>
>>> I want to have one abstract function for all my tablelists (one for each
>>> model) and (one delete_item) function in view.
>>>
>>> I don't know how to make the delete (column in this table) and pass the
>>> model to the delete_item function in the view
>>>
>>> *Tables.py*
>>>
>>>
>>>  Abstract Table
>>> class abs_Table(tables.Table):
>>>
>>> SN = tables.Column(empty_values=(), orderable=False)
>>> delete = tables.LinkColumn('delete_item', args=[A('pk'), 
>>> ?Model???],  attrs={
>>>  'a': {'class': 'btn btn-small btn-dark'}
>>> # })
>>>
>>>
>>> def __init__(self, *args, **kwargs):
>>> super(abs_Table, self).__init__(*args, **kwargs)
>>> self.counter = itertools.count(1)
>>>
>>>
>>> def render_SN(self, record):
>>>
>>> pg = getattr(self, 'paginator', None)
>>> if pg:
>>> v = next(self.counter)
>>> return v + self.paginator.per_page * (self.page.number-1)
>>> else:
>>> return next(self.counter)
>>>
>>>
>>> class Meta:
>>> model = None
>>> fields = [ 'SN', 'id',  'delete', ]
>>>
>>> attrs = {"class": "table-striped table-bordered", 'width': '100%'}
>>> empty_text = "There are no Records matching the search criteria..."
>>>
>>> Then for model Table
>>>
>>> *Tables.py*
>>>
>>>
>>> class ModelTable(abs_Table):
>>>
>>>
>>> class Meta(abs_Table.Meta):
>>> model = modelname
>>> fields = abs_Table.Meta.fields+[selected_model_fields]
>>>
>>> *Views.py*
>>>
>>>
>>>
>>>   def delete_item(request, pk, delmodel):
>>> obj = get_object_or_404(delmodel, id=pk)
>>>
>>>
>>> if request.method == "POST":
>>>
>>> obj.delete()
>>>
>>> return redirect("../")
>>> else:
>>> pass
>>>
>>>
>>> context = {
>>> 'object': obj
>>> }
>>>
>>> return render(request, '/delete_confirmation.html', context)
>>>
>>>
>>> --
>>> 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://groups.google.com/d/msgid/django-users/CA%2BkREvqnPgZ9z9j93PVd32F6dGcdtFe1dNuPkA--qx6YecJEOQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CA%2BkREvqnPgZ9z9j93PVd32F6dGcdtFe1dNuPkA--qx6YecJEOQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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-use

Re: Ongoing project

2020-12-18 Thread wongX Ndeso
Hey peter, sorry am i late to join your team? I'd love to join too..

On Fri, Dec 18, 2020, 3:41 PM Peter Kirieny  wrote:

> Okay guys, I've got your feedback
> We'll make a team, stay tuned
>
> On Fri, Dec 18, 2020, 01:19 Onlyo  wrote:
>
>> still a bit of a junior, but I'm also interested
>>
>> On Thu, Dec 17, 2020 at 11:05 PM Hesham Mahmoud <
>> heshammahmoud...@gmail.com> wrote:
>>
>>> I'm interested to work on it
>>>
>>> On Thu, Dec 17, 2020, 6:07 PM Zanii Mirzaa 
>>> wrote:
>>>
 i m intrested in this project..want to help and gain knowledge

 On Thu, 17 Dec 2020, 20:58 sakshi jain,  wrote:

> I'm working on it include me please
>
> On Thu, Dec 17, 2020, 17:13 Peter Kirieny 
> wrote:
>
>> Hello team
>> I have a project in django
>> (developing an ecommerce website with some innovations)
>>
>> Using pycharm and python, am looking for a partner here
>>
>> Am a Kenyan, in Nairobi
>>
>> If interested please inbox for more information
>>
>> --
>> 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://groups.google.com/d/msgid/django-users/CAL8t8eovVqpPJGfTAE9Q_%3DuPdazu3xxF-79CQxmcf7MNNAL6YA%40mail.gmail.com
>> 
>> .
>>
> --
> 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://groups.google.com/d/msgid/django-users/CAJhs3iNzLhrJvVutzZUZNnVu-gQkdYdMPaaB04BLPpsCOQsUMg%40mail.gmail.com
> 
> .
>
 --
 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://groups.google.com/d/msgid/django-users/CADrA_5U44g7mOSrRRb3j4SnYbW9C2W-PDadsuf7EdMK2wo7-GQ%40mail.gmail.com
 
 .

>>> --
>>> 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://groups.google.com/d/msgid/django-users/CAF5oTnBWmEOAcKnZgtweQFJrOyR46ms7J0ENvWfA-FZZbTnMxw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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://groups.google.com/d/msgid/django-users/CA%2BGoEFBsmE6%2Bk098v9hWOjJ2_2KBroeVYGNM8gCP2Fgdh1OjuA%40mail.gmail.com
>> 
>> .
>>
> --
> 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://groups.google.com/d/msgid/django-users/CAL8t8ep6K_1OyPchHTBcsaUd51FYrcAu%3DykOcrZWP1BeZjtfkQ%40mail.gmail.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJVDiUP-HO5DzypCM2So-6DpWBc_4eGEpXio8Rp3LLiSPQ%40mail.gmail.com.


Re: Auto refreshing frontend

2021-01-05 Thread wongX Ndeso
you can use django async for realtime data

On Wed, Jan 6, 2021 at 3:39 AM degnon...@gmail.com 
wrote:

> Hello,
>
> I am building a very simple website in which the main page allows users to
> import their contacts via csv or excel files to a postgres database.
>
> I have a page that displays whether or not the import of contacts is
> finished, I need my frontend to update automatically as soon as the task is
> finished in the background, basically when the data is fully imported into
> the database.
> I'm thinking of looking for a way to refresh the page every 5 second or
> something like that, but I don't think this is a good idea.
> I am not quite sure how to approach this. I still have some learning to
> do, but I need some guidance on what approach to take. I am thinking I will
> need to use JQuery/Ajax? So write my HTML template and then link it to a
> Javascript script that does the refresh?
>
> I think I can figure out how to refresh the page, but how do I have the
> model queried, view called, and new data fed to the HTML template each time
> the page auto-refreshes?
>
> I am also not sure if web sockets are what I need. If ajax is not the
> answer here, an example of scenario where ajax is useful would be really
> helpful, I always hear about it but I don't know when it can be useful.
>
> Any help or link to resources is immensely appreciated!!
>
> Thank you.
>
> --
> 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://groups.google.com/d/msgid/django-users/5560f982-adc8-4498-9dbf-ddd7677d6a51n%40googlegroups.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJUNiRdww2b1Q0BCE7zmK3Gg4Nk%2BSQv9vpvjS8vc6%2BLBgw%40mail.gmail.com.


Re: Model inheritance with optional self reference

2021-03-16 Thread wongX Ndeso
Just facing the same problem with you bro, and i ended up with proxy model
and using django-treebeard for the data hierarchy...


On Thu, 11 Mar 2021 at 17.47 Kunal Solanke 
wrote:

> Btw parts should be a m2m field ig.
>
> On Thu, Mar 11, 2021, 16:14 Kunal Solanke 
> wrote:
>
>> That's too hard of a problem statement for me,ig more experienced people
>> will be able to answer it more properly. But if its 99.99% I'd go with
>> whatever you have right now, rather than creating bunch or proxy models.
>>
>> On Thu, Mar 11, 2021, 16:06 Mateusz Wroblewski  wrote:
>>
>>> Hi All,
>>>
>>> does anybody have experience with the following data model and could
>>> advise which Django tools fit it best?
>>>
>>> Background:
>>> I have two types of Components (Core and Complex) that share many
>>> attributes and methods, but also have their own, specific data fields and
>>> methods.
>>>
>>> What complicates the design is the fact, that ComplexComponent might
>>> have CoreComponents assigned to it. A CoreComponent instance might be a
>>> "self-standing" entity without any relation to ComplexComponent, but there
>>> are also CoreComponents created only for the purpose of "building"
>>> ComplexComponents.
>>> ComplexComponent (although complex :) ) might (or might not) use
>>> CoreComponents in its structure ("complexity" comes then from a different,
>>> unrelated feature).
>>>
>>> 99.99% of the time I need to be able to handle instances of
>>> CoreComponent (self-standing entities) and instances of ComplexComponent
>>> (with their linked core components) separately in different views/areas of
>>> my application, however I can envision some special use cases where I would
>>> need to use aggregation on both types to return data for some dash board
>>> type of views (e.g. average cost of all components created this year).
>>> Also, when a ComplexComponent is handled/displayed in the view, I need
>>> to be able to access CoreComponents that "compose" it (if applicable).
>>>
>>> I'm trying to figure out what Django tools to use for modelling this
>>> setup and would be thankful to hear your take on that problem.
>>>
>>> My current setup uses base Component concrete model and
>>> CoreComponent/ComplexComponent deriving from it (and also being concrete
>>> models).
>>> I end up with three different tables. Having core components and complex
>>> components in separate tables seemed right initially, but I know this
>>> approach might be difficult to handle down the road, so I'm thinking about
>>> restructuring it and using e.g. Proxy models instead? If I rebuild these
>>> models now, I would prefer to do it "right".
>>>
>>> Does anybody have experience with a similar (the same?) design and could
>>> advise what would be the best tool in Django to implement this?
>>>
>>> Below a simplified view of the classes in scope (only for demonstration
>>> purpose).
>>>
>>> Many thanks for any feedback.
>>>
>>> Have a nice day!
>>>
>>> --
>>> 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://groups.google.com/d/msgid/django-users/36e6d27b-fd5d-4891-b999-0863a81ade85n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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://groups.google.com/d/msgid/django-users/CAOecAnwV_Zi3%3DdrUnUkChszUHktP13GO3fKkso1EA3QGjDKvjw%40mail.gmail.com
> 
> .
>

-- 
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://groups.google.com/d/msgid/django-users/CAJepfJXh0gdJF_OnQy0d5nEm89b7FLo%2BTy6-sK8U_f1x8kbFtw%40mail.gmail.com.