Multiselect List with Collapse Widget

2021-02-19 Thread sebasti...@gmail.com
Hello,

i need a new model with parent child nested relations. The final aim was 
this:

https://www.freakyjolly.com/wp-content/uploads/2020/10/Pasted-into-Angular-109-Tree-View-List-with-Expand-Collapse-and-Checkboxes-using-ngx-treeview.png

i want a mulltiselect field with subcategories. Also in widget when childs 
then parents are collapse. I want a new modelclass and when i insert this 
in model then in template the widget ist present. Please make me a offer to 
implement it.

Regards

-- 
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/9a8f6c5a-a66f-4c89-8fc0-f1ac29ee2562n%40googlegroups.com.


about related_objects

2021-02-19 Thread li wan
Hello everyone,  I got a problem

```
referenced_fields = set(chain.from_iterable(
(rf.attname for rf in rel.field.foreign_related_fields)
for rel in get_candidate_relations_to_delete(related_model._meta)
))
sub_objs = sub_objs.only(*tuple(referenced_fields))
```
It will never work, when delete a foreign key, it will select all fields.
it should not be like below code?
```
referenced_fields = set(rel.attname for rel in [f for f in 
related_model._meta.get_fields(include_hidden=True) if f.many_to_one])
sub_objs = sub_objs.only(*tuple(referenced_fields))
```

-- 
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/4638a807-47b2-41fe-8da2-1185002fc8cfn%40googlegroups.com.


Re: Job related query

2021-02-19 Thread neha bhurke
Your office is in Borivali Mumbai any one from mumbai 

On Fri, 19 Feb 2021, 8:03 pm Sharif Mehedi, 
wrote:

> Hi,
> I gave only a few months with Django and a few years with python. But I am
> good at working with a flow by getting help from the documentation.
> Here's a link to one of my Django work in progress,
> https://github.com/8lurry/heartbeat .
> I am fairly good with Django. You won't regret giving me a chance.
> Thank you
> - Mehedi
> On Friday, February 19, 2021 at 11:01:32 AM UTC+6 bhurk...@gmail.com
> wrote:
>
>> Hello everyone,
>>
>> We are looking for a python Django web app developer should have the
>> total knowledge about python Django and should be experienced person at
>> least for 2-3 years..
>> If anyone  interested …
>>
> --
> 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/e13a5425-b2bd-4abc-8fdb-433b2e7e4e58n%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/CAEwf5Q1e6KyQY3aKiMmRkpniXwu_Ok-Rcbws3-EatqkcWq6yuA%40mail.gmail.com.


Re: Job related query

2021-02-19 Thread itmind club
help me for learning python development i am from pakistan

On Fri, Feb 19, 2021 at 7:32 PM Amit prasad Gupta 
wrote:

> Dear madam,
> I am Amit Prasad Gupta and currently I am working
> as a python developer. I have 3 yr experience in python.  PFA
>
> Thanks & Regards
> Amit Prasad Gupta
>
> On Fri, Feb 19, 2021, 10:31 AM neha bhurke  wrote:
>
>> Hello everyone,
>>
>> We are looking for a python Django web app developer should have the
>> total knowledge about python Django and should be experienced person at
>> least for 2-3 years..
>> If anyone  interested …
>>
>> --
>> 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/c8e7ef0a-c72f-405f-94ce-00d953a77c52n%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/CALGO601AsxDAU_SS94kZdV%2BAXmO5f5n_YMHx5658aqeeNNN4yA%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/CAOWKetcjFmgd56h4J9XdXb2QzV%3D8S9fVaEtEor59JanSWpdhuQ%40mail.gmail.com.


Re: Job related query

2021-02-19 Thread Sharif Mehedi
Hi,
I gave only a few months with Django and a few years with python. But I am 
good at working with a flow by getting help from the documentation.
Here's a link to one of my Django work in progress, 
https://github.com/8lurry/heartbeat .
I am fairly good with Django. You won't regret giving me a chance.
Thank you
- Mehedi
On Friday, February 19, 2021 at 11:01:32 AM UTC+6 bhurk...@gmail.com wrote:

> Hello everyone,
>
> We are looking for a python Django web app developer should have the total 
> knowledge about python Django and should be experienced person at least for 
> 2-3 years..
> If anyone  interested …
>

-- 
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/e13a5425-b2bd-4abc-8fdb-433b2e7e4e58n%40googlegroups.com.


Re: can we integrate html views that look far better then what is available with django

2021-02-19 Thread sridhar vumma
The look and feel with typical example flows possible for html were not
looking similar to websites like stackoverflow.com so i had a doubt if they
all look very image free. I am a starter with Django.

Thanks & Regards,
Sridhar.V
+91-9591729335


On Thu, Feb 18, 2021 at 8:07 PM Andréas Kühne 
wrote:

> Hi,
>
> This is a very strange question? You can create anything you want with
> Django. For example Instagram and Youtube are built with Django. The
> framework allows for any design that you really want yourself - you just
> need to design the HTML the way you want - I have personally used Django
> for many different projects and they all look different. There is no
> default layout for Django - so I think I don't really understand your
> question :)
>
> Regards,
>
> Andréas
>
>
> Den tors 18 feb. 2021 kl 14:43 skrev sridhar vumma  >:
>
>> we see better html views with websites like stackoverflow.com can we
>> integrate such high end html websites along with django is that possible
>>
>> --
>> 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/e771045b-907f-479a-80c0-dd5f0079593cn%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/lRQXOzu-qps/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAK4qSCekgAb3CAW4sKF3r8wcujUOmtA9xtnMSqY%2B%3DLZzT9Gw%3DA%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/CANoZYUqRd6hYNR22d5F3MBRXNjNHj0ea7JESvs89VHBX377PpA%40mail.gmail.com.


Re: Job related query

2021-02-19 Thread Amit prasad Gupta
Dear madam,
I am Amit Prasad Gupta and currently I am working
as a python developer. I have 3 yr experience in python.  PFA

Thanks & Regards
Amit Prasad Gupta

On Fri, Feb 19, 2021, 10:31 AM neha bhurke  wrote:

> Hello everyone,
>
> We are looking for a python Django web app developer should have the total
> knowledge about python Django and should be experienced person at least for
> 2-3 years..
> If anyone  interested …
>
> --
> 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/c8e7ef0a-c72f-405f-94ce-00d953a77c52n%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/CALGO601AsxDAU_SS94kZdV%2BAXmO5f5n_YMHx5658aqeeNNN4yA%40mail.gmail.com.


Amit_Gupta.pdf
Description: Adobe PDF document


Re: Job related query

2021-02-19 Thread Smriti Garg
I am interested

On Fri, Feb 19, 2021 at 10:48 AM Desh Deepak 
wrote:

> Interested
>
> On Fri, 19 Feb 2021, 10:32 am neha bhurke,  wrote:
>
>> Hello everyone,
>>
>> We are looking for a python Django web app developer should have the
>> total knowledge about python Django and should be experienced person at
>> least for 2-3 years..
>> If anyone  interested …
>>
>> --
>> 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/c8e7ef0a-c72f-405f-94ce-00d953a77c52n%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/CAJ0m4xi2FSLNEPvgyJg_bwv73C9_yZXBK%3DKaN7MVCwXSixY7uw%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/CAO4verJ4r3b5KS2BwZmLoEDZT6DuH-V%2BTC%2Bd7_cD6d-wOkq4Gg%40mail.gmail.com.


Re: Immediately Need Help

2021-02-19 Thread shubham vashisht
If there are 4 rows which have categorycode="blah" and
citycode="blah-blah", then the space code will be something like this,
LMblahblah-blah1, LMblahblah-blah2, LMblahblah-blah3, LMblahblah-blah4.
But if you delete row with spacecode different from LMblahblah-blah4, then
your code will generate space code LMblahblah-blah4

On Fri, 19 Feb 2021, 16:07 Chetan Ganji,  wrote:

> Yes kritika show all the models.
>
> How shubham?
> If an entry is deleted, unique code will also be deleted. Next time it
> gets generated, it might be assigned to different entry, but it still be
> unique.
>
> As kritika clarified already, so it wont be a problem.
>
> On Fri, Feb 19, 2021, 3:58 PM shubham vashisht 
> wrote:
>
>> Chetan
>> If any row is deleted from the table, then your logic will fail to return
>> the unique code
>>
>> On Fri, 19 Feb 2021, 15:52 Chetan Ganji,  wrote:
>>
>>> Hi Kritika
>>>
>>> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 
>>>
>>> Teko field pe unique constraint lagana padenga
>>>
>>> Teko no wapas 1 se start karneke liye query maarana padenga
>>>
>>> last_no = Model.objects.filter(categorycode="blah",
>>> citycode="blah-blah").count()
>>>
>>> unique_code ="LM" + categorycode
>>> + citycode + str(last_no + 1)
>>>
>>>
>>> Aisa code likkha toh result milenga 
>>>
>>>
>>> On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
>>> wrote:
>>>
  I have to create a unique code for each space saved in dbAb db me save
 krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai
 uske.1st model se mujhe space category ka name uthana hai
 2nd se city code
 Category alag alg ho skti hai
 To code genrate hoga LM-categorycode-citycode-1Next time jb
 category, B hogi to number 1 se hi start hoga, ni to category same hai to
 fr se 2 allot ho jaega
 Eg Category - CW, COM
 City - Noida, DelhiSpace 1 - Cw category
 Code space 1- LMCWNoida1Space2 - CW Category
 CODE SPACE2 - LMCWDelhi2Space 3 - COM category
 CODE SPACE 3- LM-COM-NOIDA0001

 --
 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%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/CAJW_r64v1-f85ViX%2BnCFdBrupiXi5Ba%3Dzec6xoSvuZnR1jaMEg%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/CAMKMUjsJR2B7LDHujo_bXxyh1s7WZMqMwgENMQmwiX%3Dpe5QHTg%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/CAJW_r671m7KANhpAdSPuG7AabVacUOsVcgdhPgH2j8HruNkOgQ%40mail.gmail.com.


Re: Immediately Need Help

2021-02-19 Thread Kritika Paul
class Spaces(BaseModel):
__tablename__ = "spaces"
name = db.Column(db.String(255))
user_id = db.Column(db.Integer)
status = db.Column(
db.String(100), default=SpaceStatusType.PENDING.value)
space_category_id = db.Column(
db.Integer, db.ForeignKey("space_categories.id"))
space_company_id = db.Column(
db.Integer, db.ForeignKey("space_companies.id"))
space_detail_id = db.Column(db.Integer, db.ForeignKey("space_details.id"
))
space_broker_id = db.Column(db.Integer, db.ForeignKey("space_brokers.id"
))
space_building_particulars_id = db.Column(db.Integer, db.ForeignKey("
space_building_particulars.id"))
space_commercial_products_id = db.Column(db.Integer, db.ForeignKey("
space_commercial_products.id"))
space_document_id = db.Column(db.Integer, db.ForeignKey("
space_documents.id"))
is_deleted = db.Column(db.Boolean,default=False)
is_completed = db.Column(db.Boolean,default=False)
space_category = db.relationship("SpaceCategory", backref=db.backref(
"spaces", uselist=True, lazy="dynamic"))
space_company = db.relationship("SpaceCompany", backref=db.backref(
"spaces", uselist=True, lazy="dynamic"))
space_detail = db.relationship("SpaceDetail", backref=db.backref(
"spaces", uselist=True, lazy="dynamic"))
space_broker = db.relationship("SpaceBroker", backref=db.backref(
"spaces", uselist=True, lazy="dynamic"))
space_building_particulars = db.relationship("SpaceBuildingParticular",
backref=db.backref(
"spaces", uselist=True, lazy="dynamic"))
space_commercial_products=db.relationship("SpaceCommercialProduct",
backref=db.backref(
"spaces", uselist=True, lazy="dynamic"))
space_document=db.relationship("SpaceDocument", backref=db.backref(
"spaces", uselist=True, lazy="dynamic"))



Need to save in name field


On Fri, 19 Feb 2021 at 16:32, Chetan Ganji  wrote:

> Show the model where you save Space_code
>
> On Fri, Feb 19, 2021, 4:19 PM Kritika Paul 
> wrote:
>
>> class SpaceCategory(BaseModel):
>> __tablename__ = "space_categories"
>>
>> name = db.Column(db.String(255))
>> description = db.Column(db.Text)
>> image_url = db.Column(db.Text)
>> code = db.Column(db.String(100))
>> space_sub_category = db.relationship('SpaceSubCategory', backref
>> =db.backref("space_category", uselist=False))
>>
>> class Cities(BaseModel):
>> __tablename__ = "cities"
>> name = db.Column(db.String(255))
>> code = db.Column(db.String(100))
>> is_deleted = db.Column(db.Boolean,default=False)
>> These are the models,
>> There is one other model where I have to save Space_code
>>
>> Now, Space Category is CW,COM,MS
>> City Code is NOIDA, DELHI,KOlkata
>>
>> Space code to be generated such that Numbers should increase Space
>> Category Wise
>>
>>
>> On Fri, 19 Feb 2021 at 16:07, Chetan Ganji 
>> wrote:
>>
>>> Yes kritika show all the models.
>>>
>>> How shubham?
>>> If an entry is deleted, unique code will also be deleted. Next time it
>>> gets generated, it might be assigned to different entry, but it still be
>>> unique.
>>>
>>> As kritika clarified already, so it wont be a problem.
>>>
>>> On Fri, Feb 19, 2021, 3:58 PM shubham vashisht 
>>> wrote:
>>>
 Chetan
 If any row is deleted from the table, then your logic will fail to
 return the unique code

 On Fri, 19 Feb 2021, 15:52 Chetan Ganji, 
 wrote:

> Hi Kritika
>
> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 
>
> Teko field pe unique constraint lagana padenga
>
> Teko no wapas 1 se start karneke liye query maarana padenga
>
> last_no = Model.objects.filter(categorycode="blah",
> citycode="blah-blah").count()
>
> unique_code ="LM" + categorycode
> + citycode + str(last_no + 1)
>
>
> Aisa code likkha toh result milenga 
>
>
> On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
> wrote:
>
>>  I have to create a unique code for each space saved in dbAb db me
>> save krne k lie, wo multiple part me save ho rha hai, multiple models bhi
>> hai uske.1st model se mujhe space category ka name uthana hai
>> 2nd se city code
>> Category alag alg ho skti hai
>> To code genrate hoga LM-categorycode-citycode-1Next time jb
>> category, B hogi to number 1 se hi start hoga, ni to category same hai to
>> fr se 2 allot ho jaega
>> Eg Category - CW, COM
>> City - Noida, DelhiSpace 1 - Cw category
>> Code space 1- LMCWNoida1Space2 - CW Category
>> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
>> CODE SPACE 3- LM-COM-NOIDA0001
>>
>> --
>> 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 

Re: Immediately Need Help

2021-02-19 Thread Chetan Ganji
Show the model where you save Space_code

On Fri, Feb 19, 2021, 4:19 PM Kritika Paul  wrote:

> class SpaceCategory(BaseModel):
> __tablename__ = "space_categories"
>
> name = db.Column(db.String(255))
> description = db.Column(db.Text)
> image_url = db.Column(db.Text)
> code = db.Column(db.String(100))
> space_sub_category = db.relationship('SpaceSubCategory', backref
> =db.backref("space_category", uselist=False))
>
> class Cities(BaseModel):
> __tablename__ = "cities"
> name = db.Column(db.String(255))
> code = db.Column(db.String(100))
> is_deleted = db.Column(db.Boolean,default=False)
> These are the models,
> There is one other model where I have to save Space_code
>
> Now, Space Category is CW,COM,MS
> City Code is NOIDA, DELHI,KOlkata
>
> Space code to be generated such that Numbers should increase Space
> Category Wise
>
>
> On Fri, 19 Feb 2021 at 16:07, Chetan Ganji  wrote:
>
>> Yes kritika show all the models.
>>
>> How shubham?
>> If an entry is deleted, unique code will also be deleted. Next time it
>> gets generated, it might be assigned to different entry, but it still be
>> unique.
>>
>> As kritika clarified already, so it wont be a problem.
>>
>> On Fri, Feb 19, 2021, 3:58 PM shubham vashisht 
>> wrote:
>>
>>> Chetan
>>> If any row is deleted from the table, then your logic will fail to
>>> return the unique code
>>>
>>> On Fri, 19 Feb 2021, 15:52 Chetan Ganji,  wrote:
>>>
 Hi Kritika

 Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 

 Teko field pe unique constraint lagana padenga

 Teko no wapas 1 se start karneke liye query maarana padenga

 last_no = Model.objects.filter(categorycode="blah",
 citycode="blah-blah").count()

 unique_code ="LM" + categorycode
 + citycode + str(last_no + 1)


 Aisa code likkha toh result milenga 


 On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
 wrote:

>  I have to create a unique code for each space saved in dbAb db me
> save krne k lie, wo multiple part me save ho rha hai, multiple models bhi
> hai uske.1st model se mujhe space category ka name uthana hai
> 2nd se city code
> Category alag alg ho skti hai
> To code genrate hoga LM-categorycode-citycode-1Next time jb
> category, B hogi to number 1 se hi start hoga, ni to category same hai to
> fr se 2 allot ho jaega
> Eg Category - CW, COM
> City - Noida, DelhiSpace 1 - Cw category
> Code space 1- LMCWNoida1Space2 - CW Category
> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
> CODE SPACE 3- LM-COM-NOIDA0001
>
> --
> 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%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/CAJW_r64v1-f85ViX%2BnCFdBrupiXi5Ba%3Dzec6xoSvuZnR1jaMEg%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/CAMKMUjsJR2B7LDHujo_bXxyh1s7WZMqMwgENMQmwiX%3Dpe5QHTg%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> 

Re: Immediately Need Help

2021-02-19 Thread Kritika Paul
class SpaceCategory(BaseModel):
__tablename__ = "space_categories"

name = db.Column(db.String(255))
description = db.Column(db.Text)
image_url = db.Column(db.Text)
code = db.Column(db.String(100))
space_sub_category = db.relationship('SpaceSubCategory', backref
=db.backref("space_category", uselist=False))

class Cities(BaseModel):
__tablename__ = "cities"
name = db.Column(db.String(255))
code = db.Column(db.String(100))
is_deleted = db.Column(db.Boolean,default=False)
These are the models,
There is one other model where I have to save Space_code

Now, Space Category is CW,COM,MS
City Code is NOIDA, DELHI,KOlkata

Space code to be generated such that Numbers should increase Space Category
Wise


On Fri, 19 Feb 2021 at 16:07, Chetan Ganji  wrote:

> Yes kritika show all the models.
>
> How shubham?
> If an entry is deleted, unique code will also be deleted. Next time it
> gets generated, it might be assigned to different entry, but it still be
> unique.
>
> As kritika clarified already, so it wont be a problem.
>
> On Fri, Feb 19, 2021, 3:58 PM shubham vashisht 
> wrote:
>
>> Chetan
>> If any row is deleted from the table, then your logic will fail to return
>> the unique code
>>
>> On Fri, 19 Feb 2021, 15:52 Chetan Ganji,  wrote:
>>
>>> Hi Kritika
>>>
>>> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 
>>>
>>> Teko field pe unique constraint lagana padenga
>>>
>>> Teko no wapas 1 se start karneke liye query maarana padenga
>>>
>>> last_no = Model.objects.filter(categorycode="blah",
>>> citycode="blah-blah").count()
>>>
>>> unique_code ="LM" + categorycode
>>> + citycode + str(last_no + 1)
>>>
>>>
>>> Aisa code likkha toh result milenga 
>>>
>>>
>>> On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
>>> wrote:
>>>
  I have to create a unique code for each space saved in dbAb db me save
 krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai
 uske.1st model se mujhe space category ka name uthana hai
 2nd se city code
 Category alag alg ho skti hai
 To code genrate hoga LM-categorycode-citycode-1Next time jb
 category, B hogi to number 1 se hi start hoga, ni to category same hai to
 fr se 2 allot ho jaega
 Eg Category - CW, COM
 City - Noida, DelhiSpace 1 - Cw category
 Code space 1- LMCWNoida1Space2 - CW Category
 CODE SPACE2 - LMCWDelhi2Space 3 - COM category
 CODE SPACE 3- LM-COM-NOIDA0001

 --
 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%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/CAJW_r64v1-f85ViX%2BnCFdBrupiXi5Ba%3Dzec6xoSvuZnR1jaMEg%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/CAMKMUjsJR2B7LDHujo_bXxyh1s7WZMqMwgENMQmwiX%3Dpe5QHTg%40mail.gmail.com
> 
> .
>


-- 
Regards,

Kritika Paul
rkritikapau...@gmail.com
+91-7905147674

-- 
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 

Re: Immediately Need Help

2021-02-19 Thread Chetan Ganji
Yes kritika show all the models.

How shubham?
If an entry is deleted, unique code will also be deleted. Next time it gets
generated, it might be assigned to different entry, but it still be unique.

As kritika clarified already, so it wont be a problem.

On Fri, Feb 19, 2021, 3:58 PM shubham vashisht  wrote:

> Chetan
> If any row is deleted from the table, then your logic will fail to return
> the unique code
>
> On Fri, 19 Feb 2021, 15:52 Chetan Ganji,  wrote:
>
>> Hi Kritika
>>
>> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 
>>
>> Teko field pe unique constraint lagana padenga
>>
>> Teko no wapas 1 se start karneke liye query maarana padenga
>>
>> last_no = Model.objects.filter(categorycode="blah",
>> citycode="blah-blah").count()
>>
>> unique_code ="LM" + categorycode
>> + citycode + str(last_no + 1)
>>
>>
>> Aisa code likkha toh result milenga 
>>
>>
>> On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
>> wrote:
>>
>>>  I have to create a unique code for each space saved in dbAb db me save
>>> krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai
>>> uske.1st model se mujhe space category ka name uthana hai
>>> 2nd se city code
>>> Category alag alg ho skti hai
>>> To code genrate hoga LM-categorycode-citycode-1Next time jb
>>> category, B hogi to number 1 se hi start hoga, ni to category same hai to
>>> fr se 2 allot ho jaega
>>> Eg Category - CW, COM
>>> City - Noida, DelhiSpace 1 - Cw category
>>> Code space 1- LMCWNoida1Space2 - CW Category
>>> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
>>> CODE SPACE 3- LM-COM-NOIDA0001
>>>
>>> --
>>> 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%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/CAJW_r64v1-f85ViX%2BnCFdBrupiXi5Ba%3Dzec6xoSvuZnR1jaMEg%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/CAMKMUjsJR2B7LDHujo_bXxyh1s7WZMqMwgENMQmwiX%3Dpe5QHTg%40mail.gmail.com.


Re: Immediately Need Help

2021-02-19 Thread Kritika Paul
No row will be deleted, also, the code created once will never be assigned
to any other space

On Fri, 19 Feb 2021 at 15:59, shubham vashisht  wrote:

> Chetan
> If any row is deleted from the table, then your logic will fail to return
> the unique code
>
> On Fri, 19 Feb 2021, 15:52 Chetan Ganji,  wrote:
>
>> Hi Kritika
>>
>> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 
>>
>> Teko field pe unique constraint lagana padenga
>>
>> Teko no wapas 1 se start karneke liye query maarana padenga
>>
>> last_no = Model.objects.filter(categorycode="blah",
>> citycode="blah-blah").count()
>>
>> unique_code ="LM" + categorycode
>> + citycode + str(last_no + 1)
>>
>>
>> Aisa code likkha toh result milenga 
>>
>>
>> On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
>> wrote:
>>
>>>  I have to create a unique code for each space saved in dbAb db me save
>>> krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai
>>> uske.1st model se mujhe space category ka name uthana hai
>>> 2nd se city code
>>> Category alag alg ho skti hai
>>> To code genrate hoga LM-categorycode-citycode-1Next time jb
>>> category, B hogi to number 1 se hi start hoga, ni to category same hai to
>>> fr se 2 allot ho jaega
>>> Eg Category - CW, COM
>>> City - Noida, DelhiSpace 1 - Cw category
>>> Code space 1- LMCWNoida1Space2 - CW Category
>>> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
>>> CODE SPACE 3- LM-COM-NOIDA0001
>>>
>>> --
>>> 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%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/CAJW_r64v1-f85ViX%2BnCFdBrupiXi5Ba%3Dzec6xoSvuZnR1jaMEg%40mail.gmail.com
> 
> .
>


-- 
Regards,

Kritika Paul
rkritikapau...@gmail.com
+91-7905147674

-- 
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%2BQJGq4U2sE_K10Y_EbG_T9bCPnHeQcMfJ-11Ji5MDd%2B6g8AAw%40mail.gmail.com.


Re: Immediately Need Help

2021-02-19 Thread shubham vashisht
Chetan
If any row is deleted from the table, then your logic will fail to return
the unique code

On Fri, 19 Feb 2021, 15:52 Chetan Ganji,  wrote:

> Hi Kritika
>
> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 
>
> Teko field pe unique constraint lagana padenga
>
> Teko no wapas 1 se start karneke liye query maarana padenga
>
> last_no = Model.objects.filter(categorycode="blah",
> citycode="blah-blah").count()
>
> unique_code ="LM" + categorycode
> + citycode + str(last_no + 1)
>
>
> Aisa code likkha toh result milenga 
>
>
> On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
> wrote:
>
>>  I have to create a unique code for each space saved in dbAb db me save
>> krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai
>> uske.1st model se mujhe space category ka name uthana hai
>> 2nd se city code
>> Category alag alg ho skti hai
>> To code genrate hoga LM-categorycode-citycode-1Next time jb category,
>> B hogi to number 1 se hi start hoga, ni to category same hai to fr se 2
>> allot ho jaega
>> Eg Category - CW, COM
>> City - Noida, DelhiSpace 1 - Cw category
>> Code space 1- LMCWNoida1Space2 - CW Category
>> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
>> CODE SPACE 3- LM-COM-NOIDA0001
>>
>> --
>> 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%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/CAJW_r64v1-f85ViX%2BnCFdBrupiXi5Ba%3Dzec6xoSvuZnR1jaMEg%40mail.gmail.com.


Re: Immediately Need Help

2021-02-19 Thread Kritika Paul
I need to fetch it from different models. If you want I can share models
snapshot

On Fri, 19 Feb 2021 at 15:52, Chetan Ganji  wrote:

> Hi Kritika
>
> Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 
>
> Teko field pe unique constraint lagana padenga
>
> Teko no wapas 1 se start karneke liye query maarana padenga
>
> last_no = Model.objects.filter(categorycode="blah",
> citycode="blah-blah").count()
>
> unique_code ="LM" + categorycode
> + citycode + str(last_no + 1)
>
>
> Aisa code likkha toh result milenga 
>
>
> On Fri, Feb 19, 2021, 3:31 PM Kritika Paul 
> wrote:
>
>>  I have to create a unique code for each space saved in dbAb db me save
>> krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai
>> uske.1st model se mujhe space category ka name uthana hai
>> 2nd se city code
>> Category alag alg ho skti hai
>> To code genrate hoga LM-categorycode-citycode-1Next time jb category,
>> B hogi to number 1 se hi start hoga, ni to category same hai to fr se 2
>> allot ho jaega
>> Eg Category - CW, COM
>> City - Noida, DelhiSpace 1 - Cw category
>> Code space 1- LMCWNoida1Space2 - CW Category
>> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
>> CODE SPACE 3- LM-COM-NOIDA0001
>>
>> --
>> 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%40mail.gmail.com
> 
> .
>


-- 
Regards,

Kritika Paul
rkritikapau...@gmail.com
+91-7905147674

-- 
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%2BQJGq4MRsKMYkaUZh1u-Phxk4QOG1g%3DYZWf7QGUGiqEXfFjXA%40mail.gmail.com.


Re: Immediately Need Help

2021-02-19 Thread Chetan Ganji
Hi Kritika

Ye chanel mein firangi log bhi hai, unko hinglish kaisa samjhenga? 

Teko field pe unique constraint lagana padenga

Teko no wapas 1 se start karneke liye query maarana padenga

last_no = Model.objects.filter(categorycode="blah",
citycode="blah-blah").count()

unique_code ="LM" + categorycode
+ citycode + str(last_no + 1)


Aisa code likkha toh result milenga 


On Fri, Feb 19, 2021, 3:31 PM Kritika Paul  wrote:

>  I have to create a unique code for each space saved in dbAb db me save
> krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai
> uske.1st model se mujhe space category ka name uthana hai
> 2nd se city code
> Category alag alg ho skti hai
> To code genrate hoga LM-categorycode-citycode-1Next time jb category,
> B hogi to number 1 se hi start hoga, ni to category same hai to fr se 2
> allot ho jaega
> Eg Category - CW, COM
> City - Noida, DelhiSpace 1 - Cw category
> Code space 1- LMCWNoida1Space2 - CW Category
> CODE SPACE2 - LMCWDelhi2Space 3 - COM category
> CODE SPACE 3- LM-COM-NOIDA0001
>
> --
> 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/690debd2-46e0-497f-92a8-3abbc391b97dn%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/CAMKMUjs6q%2B6Xer6-MRu%3DYjhKq5EYNXahEji%2BY5HBerTaNQ1Law%40mail.gmail.com.


Immediately Need Help

2021-02-19 Thread Kritika Paul
 I have to create a unique code for each space saved in dbAb db me save 
krne k lie, wo multiple part me save ho rha hai, multiple models bhi hai 
uske.1st model se mujhe space category ka name uthana hai
2nd se city code
Category alag alg ho skti hai
To code genrate hoga LM-categorycode-citycode-1Next time jb category, B 
hogi to number 1 se hi start hoga, ni to category same hai to fr se 2 allot 
ho jaega
Eg Category - CW, COM
City - Noida, DelhiSpace 1 - Cw category
Code space 1- LMCWNoida1Space2 - CW Category
CODE SPACE2 - LMCWDelhi2Space 3 - COM category
CODE SPACE 3- LM-COM-NOIDA0001

-- 
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/690debd2-46e0-497f-92a8-3abbc391b97dn%40googlegroups.com.


Django 3.2 beta 1 released

2021-02-19 Thread Carlton Gibson
Details are available on the Django weblog: 

https://www.djangoproject.com/weblog/2021/feb/19/django-32-beta-1-released/

-- 
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/47E96F41-EF6E-4E57-82E2-B01F1733DDA1%40gmail.com.


Django security releases issued: 3.1.7, 3.0.13 and 2.2.19

2021-02-19 Thread Carlton Gibson
Details are available on the Django project weblog:

https://www.djangoproject.com/weblog/2021/feb/19/security-releases/

-- 
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/0D718304-FEB5-47D3-B2C0-6600F42F887A%40gmail.com.