Re: display data

2020-03-03 Thread Perceval Maturure
Hi Naveen.
Yes, that’s correct, I want to display the first 6 according to date. Each 
record has to be in its own cell using a bootstrap 2 row and 3 column table.
Regards


> On 4 Mar 2020, at 08:53, Naveen Arora  wrote:
> 
> So you want to display data from this model to six cards, but how..i mean 
> each row can be said as "one data" so you want to display 6 rows of this 
> table basically on 6 rows. Another question is how you want to filter the 
> data, first 6 rows according to date, etc. ?
> 
> if you want to display first 6 responses of .all(), you can easily do it 
> using " [ 0 : 6 ] "
>   
> On Tuesday, 3 March 2020 15:31:10 UTC+5:30, Perceval Maturure wrote:
> Hi Naveena
> 
> I have a model below
> 
> I  I want to display records in the db on six cards as the end date is past 
> then the record is removed from the list. I tried to use indexes but it dint 
> work as epxected
> Any ideas would be awesome to share
> 
>> On 3 Mar 2020, at 11:13, Naveen Arora > wrote:
>> 
>> Hi,
>> 
>> Can you explain what you are trying to achieve clearly.?
>> 
>> Regards
>> Naveen Arora
>> 
>> On Sunday, 1 March 2020 19:06:02 UTC+5:30, Perceval Maturure wrote:
>> Hi Team
>> is there anyone who has tried to display data from a table to six different 
>> cards, when another record is added the first initialy is replaced ?
>> regards
>> 
>> 
>> -- 
>> Perceval Maturure
>> 083 303 9423
>> 
>> 
>> -- 
>> 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...@googlegroups.com <>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/0299d7d7-13f2-49a5-859f-4b3343f88625%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/60242ac5-070a-4a61-8ca9-5478a218f7e7%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/AFB7A6F5-1CF4-4F45-A786-53A68CC8E5BF%40gmail.com.


Re: Django Platform (not just Framework)

2020-03-03 Thread guettli
By chance I found wagtail. This django project looks like I was searching: 
It is almost out of the box end user usable and
it gives me all the flexibility of django. Cool, but this is just my first 
impression, I only played a bit with it.

Am Dienstag, 3. März 2020 10:27:50 UTC+1 schrieb Naveen Arora:
>
> Hi,
>
> What plugins you would want to install ? if you are talking about pip 
> packages, you can use pycharm wrapper for the same. pycharm allows to 
> download pip packages using GUI.
>
> Cheers
> Naveen Arora
>
>
> On Monday, 2 March 2020 21:24:32 UTC+5:30, guettli wrote:
>>
>> I know the terms "Platform" and "Framework" are not well-defined.
>>
>> For me a platform allows you to install plugins without touching source 
>> code.
>>
>> For example, Nextcloud is a platform (for me).
>>
>> Is there already a third-party solution that provides a platform based on 
>> Django?
>>
>> This would be very very cool.
>>
>> Regards,
>>   Thomas Güttler
>>
>

-- 
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/b45b787c-dbf9-40b8-b44a-a55a771c0ef1%40googlegroups.com.


Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
Could you tell me how I can save image in aws S3 bucket after resizing the
image into some random pixels??


Thank you

On Wed, Mar 4, 2020 at 12:11 PM Soumen Khatua 
wrote:

> obj.save(force_insert=True, using=self.db)
> TypeError: save() got an unexpected keyword argument 'force_insert'
> [04/Mar/2020 12:11:16] "POST /register/ HTTP/1.1" 500 108601
>
> On Wed, Mar 4, 2020 at 12:00 PM Soumen Khatua 
> wrote:
>
>> okay..sure
>>
>> On Wed, Mar 4, 2020 at 11:56 AM Naveen Arora 
>> wrote:
>>
>>> Can you share the complete traceback of error + what are you passing and
>>> where so that i can understand the flow. ?
>>>
>>> Cheers
>>>
>>> On Tuesday, 3 March 2020 19:15:56 UTC+5:30, Soumen Khatua wrote:

 after changing the path still I'm getting the same type of error.

 Thank you for your response.


 On Tue, Mar 3, 2020 at 3:01 PM Naveen Arora 
 wrote:

> Try passing a relative path, as the error itself says, absolute path
> not supported.
>
> Thanks
>
> On Tuesday, 3 March 2020 13:46:11 UTC+5:30, Soumen Khatua wrote:
>>
>> Hi Folks,
>>
>> I'm using AWS S3 Bucket to store media folder(images) but I want to
>> resize each every image in 300*300. So, I'm overriding the save method
>> inside django model class. But I'm getting one error caled:
>> *   NotImplementedError: This backend doesn't support absolute paths.*
>>
>> *My django models look like:*
>>
>> * class Profile(models.Model):*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *user = models.OneToOneField(AUTH_USER_MODEL,
>> on_delete=models.CASCADE,related_name="profile")
>> profile_pic
>> = models.ImageField(default = 'profile.jpg',upload_to =
>> user_directory_path, null = True)def save(self, *args, **kwargs):
>>   super().save(*args, **kwargs)img =
>> Image.open(self.profile_pic.path)if img.height > 300 or 
>> img.width >
>> 300:output_size = (300, 300)
>> img.thumbnail(output_size)img.save(self.image.path)*
>>
>>
>>
>> I don't know how to solve this issue.
>>
>> Thank you in advance
>>
>> Regards,
>> soumen
>>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c207b85c-c966-43c5-8c23-14084bb4a979%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/1b7a29a2-8987-4169-9d4c-d6879fc35c46%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/CAPUw6WY7Np5XPetukqG%2B8Wnze8fiyj5hfrDS9rp6-Ov1PDwEBQ%40mail.gmail.com.


Re: display data

2020-03-03 Thread Naveen Arora
So you want to display data from this model to six cards, but how..i mean 
each row can be said as "one data" so you want to display 6 rows of this 
table basically on 6 rows. Another question is how you want to filter the 
data, first 6 rows according to date, etc. ?

if you want to display first 6 responses of .all(), you can easily do it 
using " [ 0 : 6 ] "
  
On Tuesday, 3 March 2020 15:31:10 UTC+5:30, Perceval Maturure wrote:
>
> Hi Naveena
>
> I have a model below
>
> I  I want to display records in the db on six cards as the end date is 
> past then the record is removed from the list. I tried to use indexes but 
> it dint work as epxected
> Any ideas would be awesome to share
>
> On 3 Mar 2020, at 11:13, Naveen Arora > 
> wrote:
>
> Hi,
>
> Can you explain what you are trying to achieve clearly.?
>
> Regards
> Naveen Arora
>
> On Sunday, 1 March 2020 19:06:02 UTC+5:30, Perceval Maturure wrote:
>>
>> Hi Team
>> is there anyone who has tried to display data from a table to six 
>> different cards, when another record is added the first initialy is 
>> replaced ?
>> regards
>>
>>
>> -- 
>> *Perceval Maturure*
>>
>> *083 303 9423*
>>
>
> -- 
> 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...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/0299d7d7-13f2-49a5-859f-4b3343f88625%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/60242ac5-070a-4a61-8ca9-5478a218f7e7%40googlegroups.com.


Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
obj.save(force_insert=True, using=self.db)
TypeError: save() got an unexpected keyword argument 'force_insert'
[04/Mar/2020 12:11:16] "POST /register/ HTTP/1.1" 500 108601

On Wed, Mar 4, 2020 at 12:00 PM Soumen Khatua 
wrote:

> okay..sure
>
> On Wed, Mar 4, 2020 at 11:56 AM Naveen Arora 
> wrote:
>
>> Can you share the complete traceback of error + what are you passing and
>> where so that i can understand the flow. ?
>>
>> Cheers
>>
>> On Tuesday, 3 March 2020 19:15:56 UTC+5:30, Soumen Khatua wrote:
>>>
>>> after changing the path still I'm getting the same type of error.
>>>
>>> Thank you for your response.
>>>
>>>
>>> On Tue, Mar 3, 2020 at 3:01 PM Naveen Arora 
>>> wrote:
>>>
 Try passing a relative path, as the error itself says, absolute path
 not supported.

 Thanks

 On Tuesday, 3 March 2020 13:46:11 UTC+5:30, Soumen Khatua wrote:
>
> Hi Folks,
>
> I'm using AWS S3 Bucket to store media folder(images) but I want to
> resize each every image in 300*300. So, I'm overriding the save method
> inside django model class. But I'm getting one error caled:
> *   NotImplementedError: This backend doesn't support absolute paths.*
>
> *My django models look like:*
>
> * class Profile(models.Model):*
>
>
>
>
>
>
>
>
>
>
>
>
>
> *user = models.OneToOneField(AUTH_USER_MODEL,
> on_delete=models.CASCADE,related_name="profile")
> profile_pic
> = models.ImageField(default = 'profile.jpg',upload_to =
> user_directory_path, null = True)def save(self, *args, **kwargs):
>   super().save(*args, **kwargs)img =
> Image.open(self.profile_pic.path)if img.height > 300 or img.width 
> >
> 300:output_size = (300, 300)
> img.thumbnail(output_size)img.save(self.image.path)*
>
>
>
> I don't know how to solve this issue.
>
> Thank you in advance
>
> Regards,
> soumen
>
 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/c207b85c-c966-43c5-8c23-14084bb4a979%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/1b7a29a2-8987-4169-9d4c-d6879fc35c46%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/CAPUw6WZNtw3xO6p9Moj-uAWA1xh6btrW%2Bow68q8duxFj-iwvDw%40mail.gmail.com.


Re: How to create multipage forms with different models

2020-03-03 Thread victor awakan

Thanks Naveen, I have try this code but when I clicked saved, the views 
redirect but no post was showing in the list view.

def new_rental(request, pk):rentalproperty = 
get_object_or_404(RentalProperty, pk=pk)user = UserModel.objects.first()
if request.method == 'POST':form = NewRentalPropertyForm(request.POST, 
request.FILES)#contract_form = NewContractForm(request.POST, prefix = 
"contracts")if form.is_valid():print ("all validation 
passed")rentalproperty = form.save()
#contract_form.cleaned_data["rentalproperty"] = rentalproperty
#contract.rentalproperty = rentalproperty#contract = 
contract_form.save()return 
HttpResponseRedirect(reverse("rental:new_contract"))else:
messages.error(request, "Error")else: form = 
NewRentalPropertyForm()#contract_form = NewContractForm(prefix = 
"contracts")return render(request, 'rental/new_rental.html', {
'rentalproperty': rentalproperty,'form': form,#'contract_form': 
contract_form,})def new_contract(request, pk):rentalproperty = 
get_object_or_404(RentalProperty, pk=pk)if request.method == 'POST':
form = NewContractForm(request.POST)if form.is_valid():
contract = form.save(commit=False)contract.rentalproperty = 
rentalpropertycontract.save()return 
HttpResponseRedirect(reverse("rental:home"))else:
messages.error(request, "Error")else:form = 
NewContractForm()return render(request, 'rental/new_contract.html', {   
 'rentalproperty': rentalproperty,'form': form,})

On Wednesday, March 4, 2020 at 8:25:15 AM UTC+2, Naveen Arora wrote:
>
> Each form field has an id to be identified at back end. So just select the 
> relevant field create a model object using the same and save it.
> Similarly do for the other.
>
> You can try for once share the code here if you are unsuccessfull, i will 
> help you with the code part then.
>
> Cheers
>
>
> On Tuesday, 3 March 2020 14:58:05 UTC+5:30, victor awakan wrote:
>>
>> What I meant was I want one form to be saved in one model and the second 
>> form to be saved in another model. I did that using form-tools but I want 
>> to learn how to do it using function based views. Thanks.
>>
>> On Tuesday, March 3, 2020 at 11:19:40 AM UTC+2, Naveen Arora wrote:
>>>
>>> Hi,
>>> 
>>> What problem you are facing ? A form can be sent to any template using 
>>> its object and context dictionary. "Split the form to separate templates" 
>>> ? This seems unusual, create different forms if you want to use more 
>>> templates. 
>>>
>>> Cheers :)
>>> Naveen Arora
>>> 
>>> On Monday, 2 March 2020 18:08:44 UTC+5:30, victor awakan wrote:

 I am a building a small project in Django. I am able to create two or 
 more forms in a template but now, I want to split the form to separate 
 templates with each form belong to different models. How can I achieve 
 this? Here is a link to dpaste with the multiple forms in a template I 
 created: http://dpaste.com/1WX0RC8

 All help and suggestions will be appreciated.
 PS. I have tried it with formtools and it worked. I am trying to learn 
 how to do the same thing with function based views. Thanks

>>>

-- 
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/0e9d6f9b-1b32-4fc0-9108-77827d13e737%40googlegroups.com.


Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
okay..sure

On Wed, Mar 4, 2020 at 11:56 AM Naveen Arora 
wrote:

> Can you share the complete traceback of error + what are you passing and
> where so that i can understand the flow. ?
>
> Cheers
>
> On Tuesday, 3 March 2020 19:15:56 UTC+5:30, Soumen Khatua wrote:
>>
>> after changing the path still I'm getting the same type of error.
>>
>> Thank you for your response.
>>
>>
>> On Tue, Mar 3, 2020 at 3:01 PM Naveen Arora  wrote:
>>
>>> Try passing a relative path, as the error itself says, absolute path not
>>> supported.
>>>
>>> Thanks
>>>
>>> On Tuesday, 3 March 2020 13:46:11 UTC+5:30, Soumen Khatua wrote:

 Hi Folks,

 I'm using AWS S3 Bucket to store media folder(images) but I want to
 resize each every image in 300*300. So, I'm overriding the save method
 inside django model class. But I'm getting one error caled:
 *   NotImplementedError: This backend doesn't support absolute paths.*

 *My django models look like:*

 * class Profile(models.Model):*













 *user = models.OneToOneField(AUTH_USER_MODEL,
 on_delete=models.CASCADE,related_name="profile")profile_pic
 = models.ImageField(default = 'profile.jpg',upload_to =
 user_directory_path, null = True)def save(self, *args, **kwargs):
   super().save(*args, **kwargs)img =
 Image.open(self.profile_pic.path)if img.height > 300 or img.width >
 300:output_size = (300, 300)
 img.thumbnail(output_size)img.save(self.image.path)*



 I don't know how to solve this issue.

 Thank you in advance

 Regards,
 soumen

>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/c207b85c-c966-43c5-8c23-14084bb4a979%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/1b7a29a2-8987-4169-9d4c-d6879fc35c46%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/CAPUw6Wb%3DzXLZS2ZJc29TzMtxE4ap7euPY_apq9ydEERiHim8SQ%40mail.gmail.com.


Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Naveen Arora
Can you share the complete traceback of error + what are you passing and 
where so that i can understand the flow. ?

Cheers

On Tuesday, 3 March 2020 19:15:56 UTC+5:30, Soumen Khatua wrote:
>
> after changing the path still I'm getting the same type of error.
>
> Thank you for your response.
>
>
> On Tue, Mar 3, 2020 at 3:01 PM Naveen Arora  > wrote:
>
>> Try passing a relative path, as the error itself says, absolute path not 
>> supported.
>>
>> Thanks
>>
>> On Tuesday, 3 March 2020 13:46:11 UTC+5:30, Soumen Khatua wrote:
>>>
>>> Hi Folks,
>>>
>>> I'm using AWS S3 Bucket to store media folder(images) but I want to 
>>> resize each every image in 300*300. So, I'm overriding the save method 
>>> inside django model class. But I'm getting one error caled:
>>> *   NotImplementedError: This backend doesn't support absolute paths.*
>>>
>>> *My django models look like:*
>>>
>>> * class Profile(models.Model):*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *user = models.OneToOneField(AUTH_USER_MODEL,
>>> on_delete=models.CASCADE,related_name="profile")profile_pic 
>>> = models.ImageField(default = 'profile.jpg',upload_to = 
>>> user_directory_path, null = True)def save(self, *args, **kwargs):  
>>>   super().save(*args, **kwargs)img = 
>>> Image.open(self.profile_pic.path)if img.height > 300 or img.width > 
>>> 300:output_size = (300, 300)
>>> img.thumbnail(output_size)img.save(self.image.path)*
>>>
>>>
>>>
>>> I don't know how to solve this issue.
>>>
>>> Thank you in advance
>>>
>>> Regards,
>>> soumen
>>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/c207b85c-c966-43c5-8c23-14084bb4a979%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/1b7a29a2-8987-4169-9d4c-d6879fc35c46%40googlegroups.com.


Re: How to create multipage forms with different models

2020-03-03 Thread Naveen Arora
Each form field has an id to be identified at back end. So just select the 
relevant field create a model object using the same and save it.
Similarly do for the other.

You can try for once share the code here if you are unsuccessfull, i will 
help you with the code part then.

Cheers


On Tuesday, 3 March 2020 14:58:05 UTC+5:30, victor awakan wrote:
>
> What I meant was I want one form to be saved in one model and the second 
> form to be saved in another model. I did that using form-tools but I want 
> to learn how to do it using function based views. Thanks.
>
> On Tuesday, March 3, 2020 at 11:19:40 AM UTC+2, Naveen Arora wrote:
>>
>> Hi,
>> 
>> What problem you are facing ? A form can be sent to any template using 
>> its object and context dictionary. "Split the form to separate templates" 
>> ? This seems unusual, create different forms if you want to use more 
>> templates. 
>>
>> Cheers :)
>> Naveen Arora
>> 
>> On Monday, 2 March 2020 18:08:44 UTC+5:30, victor awakan wrote:
>>>
>>> I am a building a small project in Django. I am able to create two or 
>>> more forms in a template but now, I want to split the form to separate 
>>> templates with each form belong to different models. How can I achieve 
>>> this? Here is a link to dpaste with the multiple forms in a template I 
>>> created: http://dpaste.com/1WX0RC8
>>>
>>> All help and suggestions will be appreciated.
>>> PS. I have tried it with formtools and it worked. I am trying to learn 
>>> how to do the same thing with function based views. Thanks
>>>
>>

-- 
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/78b2905b-9864-4b5e-aff8-79c5fbedcff9%40googlegroups.com.


Where to source a very large data structure.

2020-03-03 Thread Tim Johnson
I am building a site that will render articles and essays. They will be 
arranged by topic.


 An index of topics will be rendered. Once a topic is selected, a list 
of articles will be rendered as a secondary index.


I propose to control this rendering using two data structures that will 
grow in size as articles and/or topics are added.


One data structure would be a list or tuple of topics. The other would 
be a dictionary where topics are the keys.


As I am new to django, I am not sure where to source such data 
structures? Models.py or perhaps a new, dedicated module?


python = 3.7.2

django.VERSION = (2, 2, 6, 'final', 0)

thank you

--
Tim
tj49.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/4df33f3e-98d6-a488-7141-d64aeb6e3ed7%40akwebsoft.com.


Re: greeting

2020-03-03 Thread Motaz Hejaze
Please let me know exactly the problem  , i dont remember the case you
talking about

On Tue, 3 Mar 2020, 8:47 pm Tosin Ayoola,  wrote:

> halo.
> good day to you, thank for you response to my question about checkbox with
> django, i could really use your help on that, that why i messaged your
> privately, hoping you can help out, a sample code, models, views, form will
> help, i will appreciate if you can help me out. thanks
>
> --
> 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/CAHLKn70_4k9ksCNz3SiaOGuSX%3DVWyGkW0_01ZuLJsDeLMqLvUw%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/CAHV4E-ctYWxhoCYn71Piqd6aViBn0v9NtNyXz9%2BQZL0Wa1Rk6g%40mail.gmail.com.


Re: Django Platform (not just Framework)

2020-03-03 Thread guettli


Am Dienstag, 3. März 2020 10:27:50 UTC+1 schrieb Naveen Arora:
>
> Hi,
>
> What plugins you would want to install ? if you are talking about pip 
> packages, you can use pycharm wrapper for the same. pycharm allows to 
> download pip packages using GUI.
>
>
I am able to develop with python. I can install plugins by using pip and 
editing settings.py

But there are many people (like me), who would prefer a web-GUI (not 
PyCharm).

Regards,
  Thomas

-- 
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/3138cbd5-ce96-4c0b-9d24-55c21ff5e625%40googlegroups.com.


Cumulative Sum per month

2020-03-03 Thread Mario Bisiani
Hi!

I would like to know the best way to have the cumulative sum per month 
plottable to chartjs for example. My models.py has one field for date and 
one for decimal number. 

Thanks to you all!

-- 
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/6e80fe7d-1fe4-4845-8089-392ab3ac3da8%40googlegroups.com.


greeting

2020-03-03 Thread Tosin Ayoola
halo.
good day to you, thank for you response to my question about checkbox with
django, i could really use your help on that, that why i messaged your
privately, hoping you can help out, a sample code, models, views, form will
help, i will appreciate if you can help me out. thanks

-- 
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/CAHLKn70_4k9ksCNz3SiaOGuSX%3DVWyGkW0_01ZuLJsDeLMqLvUw%40mail.gmail.com.


Re: Django - CreateView not saving form with nested formset

2020-03-03 Thread Shazia Nusrat
Hi,

Tried all suggestions above and nothing worked out.
To my surprise I heard Python/Django community is more robust and helping
before decided to pick my dev stack. But no contribution by the community.



On Sun, Feb 23, 2020 at 7:23 PM maninder singh Kumar <
maninder.s.ku...@gmail.com> wrote:

> Great thought
>
>
> [image: --]
>
> Maninder Kumar
> [image: http://]about.me/maninder.s.kumar
> 
>
>
>
>
> On Mon, Feb 24, 2020 at 7:00 AM bnmng  wrote:
>
>> One thing you can try for troubleshooting is an else clause to go with
>> your is_valid
>>
>> if education.is_valid():
>> education.save(commit=False)
>> education.instance = self.object
>> education.save()
>> else:
>> print('There was an error')
>> for err in education.errors:
>>   print(err)
>>
>>
>> On Sunday, February 23, 2020 at 2:01:37 AM UTC-5, Shazia Nusrat wrote:
>>>
>>> Hi,
>>>
>>> Can someone help to answer the question in link?
>>> Also I've been trying to get CreateView working with 5 inline formsets
>>> but couldn't make it work.
>>>
>>> Will really appreciate your help if someone can help me with working
>>> example.
>>>
>>> Question:
>>> https://stackoverflow.com/questions/60354976/django-createview-not-saving-form-with-nested-formset
>>>
>>> Regards,
>>>
>>> Shazia
>>>
>> --
>> 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/86c26d31-485c-4e80-8c82-18eb4b602deb%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/CABOHK3RgNPJkQc7Ro3%2BBMNuKzoAnCeXi20wEJUfsuAqhHe85tA%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/CAD83tOyVs4WQ%2B9rV6oQiiniAT4ZARGZxFvmkYhQWe-6mw0zu1A%40mail.gmail.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread Omar Abou Mrad
[Alternative] While this shouldn't be considered as a way to circumvent
learning how to
configure apache or nginx to serve/proxy python apps, you can also consider
sticking
to pure python dependencies (if this is for personal use). you can ignore
the webserver
completely and simply opt for [1] gunicorn for app serving and use [2]
whitenoise for
serving static files.

[1] https://gunicorn.org/
[2] http://whitenoise.evans.io/

On Tue, Mar 3, 2020 at 3:02 PM 'MH' via Django users <
django-users@googlegroups.com> wrote:

> Dear Andreas
>
> I want to build a little system, which consists of several django apps
> that help me in my daily life. But I don't want to upload documents about
> insurances and stuff to any cloud. Therefore I wanted a solution on premise
> and the NAS seemed to be a good choice. Could be wrong about that. So far I
> was happy with development version, but it seems difficult to install other
> things like mod-wsgi.
>
> Best regards
> MH
>
> --
> 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/564baec6-a88e-4360-bb13-9518b1f40634%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/CAFwtXp0W%3D%2BmbYxq1iYVv8AgP%3DE4_KPo6FgLCu5qE_KxabiGLfg%40mail.gmail.com.


Re: Integrating Django Rest Framework with Microsoft Office 365

2020-03-03 Thread Nosa Omorodion
Thank you guys.

I would go through said docs and give feedback

On Tue, Mar 3, 2020 at 2:37 PM Integr@te System 
wrote:

> Hi Nosa,
>
> Plz check this doc to set up service-to-service call and thanks to
> expert's doc above to perform your task.
>
>
> https://docs.microsoft.com/en-us/office/office-365-management-api/get-started-with-office-365-management-apis
>
> Hope it useful.
>
>
> On Sun, Mar 1, 2020, 19:56 Nosa Omorodion 
> wrote:
>
>> I am currently trying to consume the Microsoft Office365 API and Expose
>> it via DRF to my frontend.
>>
>> I want to be able to:
>>
>>1.
>>
>>Give Role/Permissions to authenticated Users based off of Django
>>already existing roles and Permission
>>2.
>>
>>Expose the APIs to my Angular frontend for authentication.
>>
>> How do i save authenticated users to the Database and give them the
>> requisite permission so they authenticate having the given permission the
>> next time they login?
>>
>> --
>> 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/e9d9250a-d065-493b-ba58-6117db13a50c%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/CAP5HUWqDrkGOoDB0%3DQZwAP086AV%3DdsT-xdz3y0oORbFuZaeGHg%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/CAMDZ7CwZmNpRXp_2TxgUuRthvbiwyGocNGg-zBbbRB2Pgxx9Ng%40mail.gmail.com.


Re: display data

2020-03-03 Thread Perceval Maturure
Hi Kushal
Do you ming pointing me to some documentation to be able to do this
Regards
Perceval

> On 1 Mar 2020, at 15:40, Kushal Neupane  wrote:
> 
> Search render tag
> 
> On Sun, Mar 1, 2020, 19:20 Perceval Maturure  > wrote:
> Hi Team
> is there anyone who has tried to display data from a table to six different 
> cards, when another record is added the first initialy is replaced ?
> regards
> 
> 
> -- 
> Perceval Maturure
> 083 303 9423
> 
> 
> -- 
> 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/CAFZtZmAOy-JZJ3sjFu4VOufzYcBkSQt55y5o55aeFo_pMzkkSQ%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/CAFWyajXn4nnhnOauMAFW-EdAveqt%3DHECUU1jUx4_8%3D59MGOz5Q%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/E3420430-BCD5-4A84-86F3-D3BA081E7506%40gmail.com.


Re: help with creating checkbox form

2020-03-03 Thread 'MH' via Django users
Dear Tosin

In my html template I used 
{% csrf_token %}
{{ form.as_p }}
 

and in my views.py in the corresponding view I have a section where I check 
if the method is POST:
if request.method == 'POST':

Later I do this:
var_list_of_checked_boxes = request.POST.getlist('var_selection')


-- 
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/7f16fe5c-ea05--8225-b88cb5d54b3d%40googlegroups.com.


Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
after changing the path still I'm getting the same type of error.

Thank you for your response.


On Tue, Mar 3, 2020 at 3:01 PM Naveen Arora 
wrote:

> Try passing a relative path, as the error itself says, absolute path not
> supported.
>
> Thanks
>
> On Tuesday, 3 March 2020 13:46:11 UTC+5:30, Soumen Khatua wrote:
>>
>> Hi Folks,
>>
>> I'm using AWS S3 Bucket to store media folder(images) but I want to
>> resize each every image in 300*300. So, I'm overriding the save method
>> inside django model class. But I'm getting one error caled:
>> *   NotImplementedError: This backend doesn't support absolute paths.*
>>
>> *My django models look like:*
>>
>> * class Profile(models.Model):*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *user = models.OneToOneField(AUTH_USER_MODEL,
>> on_delete=models.CASCADE,related_name="profile")profile_pic
>> = models.ImageField(default = 'profile.jpg',upload_to =
>> user_directory_path, null = True)def save(self, *args, **kwargs):
>>   super().save(*args, **kwargs)img =
>> Image.open(self.profile_pic.path)if img.height > 300 or img.width >
>> 300:output_size = (300, 300)
>> img.thumbnail(output_size)img.save(self.image.path)*
>>
>>
>>
>> I don't know how to solve this issue.
>>
>> Thank you in advance
>>
>> Regards,
>> soumen
>>
> --
> 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/c207b85c-c966-43c5-8c23-14084bb4a979%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/CAPUw6WYkjYTyBJNR%3DZdTYHKRcYV00O8f2NZPx%3DbcepO%3D0OP2fQ%40mail.gmail.com.


Re: Integrating Django Rest Framework with Microsoft Office 365

2020-03-03 Thread Integr@te System
Hi Nosa,

Plz check this doc to set up service-to-service call and thanks to expert's
doc above to perform your task.

https://docs.microsoft.com/en-us/office/office-365-management-api/get-started-with-office-365-management-apis

Hope it useful.


On Sun, Mar 1, 2020, 19:56 Nosa Omorodion 
wrote:

> I am currently trying to consume the Microsoft Office365 API and Expose it
> via DRF to my frontend.
>
> I want to be able to:
>
>1.
>
>Give Role/Permissions to authenticated Users based off of Django
>already existing roles and Permission
>2.
>
>Expose the APIs to my Angular frontend for authentication.
>
> How do i save authenticated users to the Database and give them the
> requisite permission so they authenticate having the given permission the
> next time they login?
>
> --
> 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/e9d9250a-d065-493b-ba58-6117db13a50c%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/CAP5HUWqDrkGOoDB0%3DQZwAP086AV%3DdsT-xdz3y0oORbFuZaeGHg%40mail.gmail.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread 'MH' via Django users
Dear Andreas

I want to build a little system, which consists of several django apps that 
help me in my daily life. But I don't want to upload documents about 
insurances and stuff to any cloud. Therefore I wanted a solution on premise 
and the NAS seemed to be a good choice. Could be wrong about that. So far I 
was happy with development version, but it seems difficult to install other 
things like mod-wsgi.

Best regards
MH

-- 
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/564baec6-a88e-4360-bb13-9518b1f40634%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread 'MH' via Django users
Dear nitish

Thanks for your reply. I guess it is kind of a linux that Synology uses, 
but it is different from other distros. So many advice on the internet 
builds upon the ability to install packages via apt-get or ipkg, but both 
are not available here. Somehow (really only somehow) I got entware/opkg 
installed. But since then I have problems with the installations of most 
packages there.

Here are the results of my adaption of your suggested commands:

/opt/bin# ./opkg find httpd
/opt/bin#

So, it seems there is no httpd24 on this repo.

/opt/bin# ./opkg install apache
Package apache (2.4.37-2) installed in root is up to date.

/opt/bin# ./opkg install gcc
Package gcc (7.4.0-5) installed in root is up to date.

/opt/bin# sudo python3.5 -m pip install mod-wsgi
Collecting mod-wsgi
  Using cached mod_wsgi-4.7.1.tar.gz (498 kB)
ERROR: Command errored out with exit status 1:
 command: /usr/local/bin/python3.5 -c 'import sys, setuptools, 
tokenize; sys.argv[0] = 
'"'"'/tmp/pip-install-24inw61_/mod-wsgi/setup.py'"'"'; 
__file__='"'"'/tmp/pip-install-24inw61_/mod-wsgi/setup.py'"'"';f=getattr(tokenize,
 
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
egg_info --egg-base /tmp/pip-install-24inw61_/mod-wsgi/pip-egg-info
 cwd: /tmp/pip-install-24inw61_/mod-wsgi/
Complete output (5 lines):
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/pip-install-24inw61_/mod-wsgi/setup.py", line 168, in 

'missing Apache httpd server packages.' % APXS)
RuntimeError: The 'apxs' command appears not to be installed or is not 
executable. Please check the list of prerequisites in the documentation for 
this package and install any missing Apache httpd server packages.

ERROR: Command errored out with exit status 1: python setup.py egg_info 
Check the logs for full command output.

I guess there are many problems, but this is just a start.

Best regards
MH


On Monday, March 2, 2020 at 9:04:23 PM UTC+1, MH wrote:
>
> Hi there
>
> I am rather a newbie, but after some problems I got django installed on my 
> Synology Diskstation. So, I ignored many other problems and am very happy 
> that I built my very first, very simple app. And now I would like to move 
> it from the development stage to the production stage. Obviously I should 
> make a change to a distinct webserver. Synology offers nginx and apache 
> 2.4. I installed both. And now I do not really know how to proceed. Out 
> there, there are many instructions to use something called mod-wsgi. But I 
> cannot install this from the package center of the Diskstation.
>
> I also tried to get opkg working. And this did not turn out so well, too. 
> Most packages return an error, when I try to install something. Before this 
> gets too elusive, I would ask you for guidance and then I can provide you 
> with the following error messages.
>
> Best regards
> MH
>

-- 
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/ca388790-6dbf-448b-bde6-da14b055e9de%40googlegroups.com.


Re: help with creating checkbox form

2020-03-03 Thread 'MH' via Django users
Hi

I got something like this to work with
var_selection = forms.MultipleChoiceField(required=False, widget=forms.
CheckboxSelectMultiple, choices=a_list_that_i_prepared_previously,)




On Tuesday, March 3, 2020 at 12:46:10 PM UTC+1, Tosin Ayoola wrote:
>
> Good day guyz, 
> i'm working on  a project that requires user making multiple selections 
> using checkbox after which these selected item get save to the database 
> after click on the on submit i've research on this and can't find any help, 
> i have it on html and javascript but i need the selected item saved to 
> database, can any one help me out, pls it urgent ?
>

-- 
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/b97e1632-f041-4bb8-a501-d6001fff1edc%40googlegroups.com.


Re: Stuck with Django on a Synology Diskstation

2020-03-03 Thread Andréas Kühne
Hi,

I don't think this is actually possible. Django runs python and not only
simple html. Nginx and apache are simple webservers. So unless you can get
good access to the terminal on the diskstation - I wouldn't even try this.
Why do you want to have the application running on a disk station?

Regards,

Andréas


Den mån 2 mars 2020 kl 21:04 skrev 'MH' via Django users <
django-users@googlegroups.com>:

> Hi there
>
> I am rather a newbie, but after some problems I got django installed on my
> Synology Diskstation. So, I ignored many other problems and am very happy
> that I built my very first, very simple app. And now I would like to move
> it from the development stage to the production stage. Obviously I should
> make a change to a distinct webserver. Synology offers nginx and apache
> 2.4. I installed both. And now I do not really know how to proceed. Out
> there, there are many instructions to use something called mod-wsgi. But I
> cannot install this from the package center of the Diskstation.
>
> I also tried to get opkg working. And this did not turn out so well, too.
> Most packages return an error, when I try to install something. Before this
> gets too elusive, I would ask you for guidance and then I can provide you
> with the following error messages.
>
> Best regards
> MH
>
> --
> 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/3b30b913-c881-451d-a25e-3539eaefa035%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/CAK4qSCcNLXD%2BG2ihPhQ%2BM%2BcwwaC3NYwJ5424mxjrbOSCMdYM4A%40mail.gmail.com.


Re: help with creating checkbox form

2020-03-03 Thread Kasper Laudrup

Hi Tosin,

On 03/03/2020 12.44, Tosin Ayoola wrote:

Good day guyz,
i'm working on  a project that requires user making multiple selections 
using checkbox after which these selected item get save to the database 
after click on the on submit i've research on this and can't find any 
help, i have it on html and javascript but i need the selected item 
saved to database, can any one help me out, pls it urgent ?




I assume you have already followed the Django tutorial to get a grasp of 
the basics. Then have a look here:


https://docs.djangoproject.com/en/3.0/topics/forms/

to implement what you need and feel free to ask any specific questions 
you might have.


Kind regards,

Kasper Laudrup

--
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/fb8a51a9-fd86-d4f4-85aa-c3dd888f301c%40stacktrace.dk.


help with creating checkbox form

2020-03-03 Thread Tosin Ayoola
Good day guyz,
i'm working on  a project that requires user making multiple selections
using checkbox after which these selected item get save to the database
after click on the on submit i've research on this and can't find any help,
i have it on html and javascript but i need the selected item saved to
database, can any one help me out, pls it urgent ?

-- 
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/CAHLKn71ganzUWEbc6HB%2B5yC%2B%3D0TyA7MYtjA3oJv_fAt4Ks6%3DpQ%40mail.gmail.com.


How to integrate QuillJS into Django?

2020-03-03 Thread guettli
I would like to integrate the WYSIWYG editor QuillJS into my application.

First I was happy, since I found: https://github.com/muke5hy/django-quilljs

But something does not work, and now I am unsure.

The above github project is a fork. The project does not seem to be well 
maintained.

Now I am unsure. I guess I am on the wrong track.

I guess most developers who want to use QuillJS integrate it on their own,
without this thin wrapper (django-quilljs)

Do you agree?

I guess it can get it done without this wrapper.

How would you do this?

Would you copy the quilljs source into your git repo?

If not, how to link this, so that setting up a new system is easy?

Regards,
  Thomas


-- 
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/3b9f4fd4-0f07-464e-bc2d-ebc8ae103f4c%40googlegroups.com.


Re: How to create multipage forms with different models

2020-03-03 Thread victor awakan
@suraj Could you show by example? I have tried one way which I posted the
dpaste link with my first post but it doesn’t work. I.e when I clicked
submit I don’t get any new post in the template. Thanks

On Tue 3. Mar 2020 at 11.44, Suraj Thapa FC  wrote:

> There can be only one view for one page
> You have to implement both in same view
>
> On Tue, 3 Mar 2020, 2:58 pm victor awakan,  wrote:
>
>> What I meant was I want one form to be saved in one model and the second
>> form to be saved in another model. I did that using form-tools but I want
>> to learn how to do it using function based views. Thanks.
>>
>> On Tuesday, March 3, 2020 at 11:19:40 AM UTC+2, Naveen Arora wrote:
>>>
>>> Hi,
>>> 
>>> What problem you are facing ? A form can be sent to any template using
>>> its object and context dictionary. "Split the form to separate templates"
>>> ? This seems unusual, create different forms if you want to use more
>>> templates.
>>>
>>> Cheers :)
>>> Naveen Arora
>>> 
>>> On Monday, 2 March 2020 18:08:44 UTC+5:30, victor awakan wrote:

 I am a building a small project in Django. I am able to create two or
 more forms in a template but now, I want to split the form to separate
 templates with each form belong to different models. How can I achieve
 this? Here is a link to dpaste with the multiple forms in a template I
 created: http://dpaste.com/1WX0RC8

 All help and suggestions will be appreciated.
 PS. I have tried it with formtools and it worked. I am trying to learn
 how to do the same thing with function based views. Thanks

>>> --
>> 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/0c158202-002d-484d-b0c1-332ca7e3c606%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/CAPjsHcESh5A04xcL4d4bNCrxWR07NpdN7o6Ef20FUA-UvNziiA%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/CAAipwd8dYWwzCiPrj4mywq82emncMsPARHHWf16egJnahJpi9w%40mail.gmail.com.


Re: How to create multipage forms with different models

2020-03-03 Thread Suraj Thapa FC
There can be only one view for one page
You have to implement both in same view

On Tue, 3 Mar 2020, 2:58 pm victor awakan,  wrote:

> What I meant was I want one form to be saved in one model and the second
> form to be saved in another model. I did that using form-tools but I want
> to learn how to do it using function based views. Thanks.
>
> On Tuesday, March 3, 2020 at 11:19:40 AM UTC+2, Naveen Arora wrote:
>>
>> Hi,
>> 
>> What problem you are facing ? A form can be sent to any template using
>> its object and context dictionary. "Split the form to separate templates"
>> ? This seems unusual, create different forms if you want to use more
>> templates.
>>
>> Cheers :)
>> Naveen Arora
>> 
>> On Monday, 2 March 2020 18:08:44 UTC+5:30, victor awakan wrote:
>>>
>>> I am a building a small project in Django. I am able to create two or
>>> more forms in a template but now, I want to split the form to separate
>>> templates with each form belong to different models. How can I achieve
>>> this? Here is a link to dpaste with the multiple forms in a template I
>>> created: http://dpaste.com/1WX0RC8
>>>
>>> All help and suggestions will be appreciated.
>>> PS. I have tried it with formtools and it worked. I am trying to learn
>>> how to do the same thing with function based views. Thanks
>>>
>> --
> 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/0c158202-002d-484d-b0c1-332ca7e3c606%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/CAPjsHcESh5A04xcL4d4bNCrxWR07NpdN7o6Ef20FUA-UvNziiA%40mail.gmail.com.


Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Naveen Arora
Try passing a relative path, as the error itself says, absolute path not 
supported.

Thanks

On Tuesday, 3 March 2020 13:46:11 UTC+5:30, Soumen Khatua wrote:
>
> Hi Folks,
>
> I'm using AWS S3 Bucket to store media folder(images) but I want to resize 
> each every image in 300*300. So, I'm overriding the save method inside 
> django model class. But I'm getting one error caled:
> *   NotImplementedError: This backend doesn't support absolute paths.*
>
> *My django models look like:*
>
> * class Profile(models.Model):*
>
>
>
>
>
>
>
>
>
>
>
>
>
> *user = models.OneToOneField(AUTH_USER_MODEL,
> on_delete=models.CASCADE,related_name="profile")profile_pic 
> = models.ImageField(default = 'profile.jpg',upload_to = 
> user_directory_path, null = True)def save(self, *args, **kwargs):  
>   super().save(*args, **kwargs)img = 
> Image.open(self.profile_pic.path)if img.height > 300 or img.width > 
> 300:output_size = (300, 300)
> img.thumbnail(output_size)img.save(self.image.path)*
>
>
>
> I don't know how to solve this issue.
>
> Thank you in advance
>
> Regards,
> soumen
>

-- 
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/c207b85c-c966-43c5-8c23-14084bb4a979%40googlegroups.com.


Re: How to create multipage forms with different models

2020-03-03 Thread victor awakan
What I meant was I want one form to be saved in one model and the second 
form to be saved in another model. I did that using form-tools but I want 
to learn how to do it using function based views. Thanks.

On Tuesday, March 3, 2020 at 11:19:40 AM UTC+2, Naveen Arora wrote:
>
> Hi,
> 
> What problem you are facing ? A form can be sent to any template using its 
> object and context dictionary. "Split the form to separate templates" ? 
> This seems unusual, create different forms if you want to use more 
> templates. 
>
> Cheers :)
> Naveen Arora
> 
> On Monday, 2 March 2020 18:08:44 UTC+5:30, victor awakan wrote:
>>
>> I am a building a small project in Django. I am able to create two or 
>> more forms in a template but now, I want to split the form to separate 
>> templates with each form belong to different models. How can I achieve 
>> this? Here is a link to dpaste with the multiple forms in a template I 
>> created: http://dpaste.com/1WX0RC8
>>
>> All help and suggestions will be appreciated.
>> PS. I have tried it with formtools and it worked. I am trying to learn 
>> how to do the same thing with function based views. Thanks
>>
>

-- 
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/0c158202-002d-484d-b0c1-332ca7e3c606%40googlegroups.com.


Re: Django Platform (not just Framework)

2020-03-03 Thread Naveen Arora
Hi,

What plugins you would want to install ? if you are talking about pip 
packages, you can use pycharm wrapper for the same. pycharm allows to 
download pip packages using GUI.

Cheers
Naveen Arora


On Monday, 2 March 2020 21:24:32 UTC+5:30, guettli wrote:
>
> I know the terms "Platform" and "Framework" are not well-defined.
>
> For me a platform allows you to install plugins without touching source 
> code.
>
> For example, Nextcloud is a platform (for me).
>
> Is there already a third-party solution that provides a platform based on 
> Django?
>
> This would be very very cool.
>
> Regards,
>   Thomas Güttler
>

-- 
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/9266bb40-6ecb-4fd9-8709-678d5cd875e1%40googlegroups.com.


Re: AttributeError: 'NoneType' object has no attribute 'app_name'

2020-03-03 Thread Naveen Arora
Hi, 

Can't the error be resolved ? Still, if error has to occur then you can put 
conditions instead of try blocks for better functioning.

Regards
Naveen Arora


On Monday, 2 March 2020 18:25:15 UTC+5:30, Sencer Hamarat wrote:
>
> Hello, 
>
> The project I'm working on has it's custom template context_processor.
> And when unavailable URL request arrives to Django (Eg. "/wp-login.php"), 
> the context_processor is throwing AttributeError.
>
> Which way should I use to prevent from context processor from throwing 
> errors?
> Is it ok to wrapping return with try block and returning empty dictionary 
> if AttributeError raised?
>
> def resolver_context_processor(request):
> return {
> 'app_name': request.resolver_match.app_name,
> 'namespace': request.resolver_match.namespace,
> 'url_name': request.resolver_match.url_name
> }
>
>
>
>

-- 
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/77b25608-b663-440c-977c-4fedfd808c8c%40googlegroups.com.


Re: The field admin.LogEntry.user was declared with a lazy reference to 'account.user', but app 'account' doesn't provide model 'user'

2020-03-03 Thread Naveen Arora
If you are interfering with USER model, note that you have to change the 
deafult model to first migration only.
Solution - Delete the migrations folder, run makemigrations and migrate 
again. Also, if you are overriding any model, must define it in settings.py.

Regards
Naveen Arora

On Monday, 2 March 2020 18:09:14 UTC+5:30, sagar ninave wrote:
>
>

-- 
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/a53b93cc-2dd0-46a6-9887-f10b8cdadb91%40googlegroups.com.


Re: new to django

2020-03-03 Thread Naveen Arora
Hi, 

Have a look at my tutorials :)

https://www.geeksforgeeks.org/django-tutorial/

Cheers,
Naveen Arora

On Sunday, 1 March 2020 23:34:45 UTC+5:30, Gurjot Kawatra wrote:
>
> hello everyone ...if anybody could help me out
> my django server is started and i'm able to see congratulation messege...
> now plz tell me the next step to create a project and run and watching 
> output at the localhost:8000
>

-- 
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/68101164-382b-4f2e-96a8-0fc17682de62%40googlegroups.com.


Re: How to create multipage forms with different models

2020-03-03 Thread Naveen Arora
Hi,

What problem you are facing ? A form can be sent to any template using its 
object and context dictionary. "Split the form to separate templates" ? 
This seems unusual, create different forms if you want to use more 
templates. 

Cheers :)
Naveen Arora

On Monday, 2 March 2020 18:08:44 UTC+5:30, victor awakan wrote:
>
> I am a building a small project in Django. I am able to create two or more 
> forms in a template but now, I want to split the form to separate templates 
> with each form belong to different models. How can I achieve this? Here is 
> a link to dpaste with the multiple forms in a template I created: 
> http://dpaste.com/1WX0RC8
>
> All help and suggestions will be appreciated.
> PS. I have tried it with formtools and it worked. I am trying to learn how 
> to do the same thing with function based views. Thanks
>

-- 
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/bcc340d9-a70b-449c-825b-4819969c35d1%40googlegroups.com.


Re: Error while adding entries through django admin

2020-03-03 Thread Naveen Arora
Hi,

First, it would be easy t debug if you share entire traceback + one 
solution would be to run makemigrations and migrations again :)

Did you override any default template from the codebase ?

Regards
Naveen Arora

On Monday, 2 March 2020 16:34:03 UTC+5:30, Santhosh sridhar wrote:
>
> Hi,
> I have registered a model in my django admin page. When I click the Add 
> link, it throws me this error, Invalid block tag: 
> 'change_list_object_tools', expected 'endblock'
>
> *django.template.base.TemplateSyntaxError: . I could not get any solution. 
> Appreciating someone's help.*
>
>
> *Regards,*
>
> *Santhosh*
>

-- 
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/d71918a8-9170-406f-9985-9651b4eaa46c%40googlegroups.com.


Re: display data

2020-03-03 Thread Naveen Arora
Hi,

Can you explain what you are trying to achieve clearly.?

Regards
Naveen Arora

On Sunday, 1 March 2020 19:06:02 UTC+5:30, Perceval Maturure wrote:
>
> Hi Team
> is there anyone who has tried to display data from a table to six 
> different cards, when another record is added the first initialy is 
> replaced ?
> regards
>
>
> -- 
> *Perceval Maturure*
>
> *083 303 9423*
>

-- 
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/0299d7d7-13f2-49a5-859f-4b3343f88625%40googlegroups.com.


NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
Hi Folks,

I'm using AWS S3 Bucket to store media folder(images) but I want to resize
each every image in 300*300. So, I'm overriding the save method inside
django model class. But I'm getting one error caled:
*   NotImplementedError: This backend doesn't support absolute paths.*

*My django models look like:*

* class Profile(models.Model):*













*user = models.OneToOneField(AUTH_USER_MODEL,
on_delete=models.CASCADE,related_name="profile")profile_pic
= models.ImageField(default = 'profile.jpg',upload_to =
user_directory_path, null = True)def save(self, *args, **kwargs):
  super().save(*args, **kwargs)img =
Image.open(self.profile_pic.path)if img.height > 300 or img.width >
300:output_size = (300, 300)
img.thumbnail(output_size)img.save(self.image.path)*



I don't know how to solve this issue.

Thank you in advance

Regards,
soumen

-- 
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/CAPUw6WYJxPh%3DHY%2Bm0HLajTN1EV-9eo4djThgiCZdjdbaM2pr0A%40mail.gmail.com.