Convert base64 into zipfile in django serializers

2020-04-30 Thread yashwanth balanagu
Convert base64 into zipfile in django serializers -- 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 discuss

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread Sergei Sokov
А как тогда? self.fields['name_job'].queryset = TypJob.objects.filter(author__id=self.user.id) как тогда фильтр будет работать? среда, 29 апреля 2020 г., 20:36:00 UTC+2 пользователь hend hend написал: > > *Не нужно нигде в классе формы обращаться к 'self.user'. * > > среда, 29 апреля 2020 г.,

{"image":["File extension “zip” is not allowed. Allowed extensions are: bmp, dib, gif, tif, tiff, jfif, jpe, jpg, jpeg, pbm, pgm, ppm, pnm, png, apng, blp, bufr, cur, pcx, dcx, dds, ps, eps, fit, fits

2020-04-30 Thread yashwanth balanagu
{"image":["File extension “zip” is not allowed. Allowed extensions are: bmp, dib, gif, tif, tiff, jfif, jpe, jpg, jpeg, pbm, pgm, ppm, pnm, png, apng, blp, bufr, cur, pcx, dcx, dds, ps, eps, fit, fits, fli, flc, ftc, ftu, gbr, grib, h5, hdf, jp2, j2k, jpc, jpf, jpx, j2c, icns, ico, im, iim, mpg

Re: Question regarding Interactive Python shell response and django

2020-04-30 Thread Derek
Again; the issue is why are you mixing up the console/shell with the web-facing aspect? These are designed for different ways of interacting with Django. Its almost like you are asking "how to hit in a screw with a a hammer?". What is the underlying problem you are trying to solve? On Wednesd

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread hend hend
Уже приводил вариант без self, хотя и с self должно бы работать нормально, но раз ругается попробуйте без self. def __init__(self, *args, **kwargs): # get 'user' param from kwargs # user without self user = kwargs.pop('user', None) super().__init__(*args, **kwar

Re: {"image":["File extension “zip” is not allowed. Allowed extensions are: bmp, dib, gif, tif, tiff, jfif, jpe, jpg, jpeg, pbm, pgm, ppm, pnm, png, apng, blp, bufr, cur, pcx, dcx, dds, ps, eps, fit,

2020-04-30 Thread 'Amitesh Sahay' via Django users
This is a very less information, please share more information, code snippet where the attachment conditions are written, etc. Regards, Amitesh On Thursday, 30 April, 2020, 02:05:59 pm IST, yashwanth balanagu wrote: {"image":["File extension “zip” is not allowed. Allowed extensions

Django based project app structure

2020-04-30 Thread shubham joshi
https://dpaste.org/o1sO#L89 this is my entire projects's model, how should i spit it into multiple apps? how to decide -- 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 e

Re: {"image":["File extension “zip” is not allowed. Allowed extensions are: bmp, dib, gif, tif, tiff, jfif, jpe, jpg, jpeg, pbm, pgm, ppm, pnm, png, apng, blp, bufr, cur, pcx, dcx, dds, ps, eps, fit,

2020-04-30 Thread yashwanth balanagu
from rest_framework import routers, serializers, viewsets import base64 from .models import upload import zipfile import os class Base64ImageField(serializers.ImageField): """ A Django REST framework field for handling image-uploads through raw post data. It uses base64 for encodin

Re: App Dev wanted

2020-04-30 Thread Kola Badmus
I want to help Sent from my iPhone > On 29 Apr 2020, at 3:25 PM, mohamed khaled > wrote: > > I am django developer and I have collaborated two projects and I am working > on third project is a little bit bigger than other this my github > https://github.com/khaldon I will collaborate with y

I really need help pls assist this error

2020-04-30 Thread Listenable Music
1st error in http://127.0.0.1:8000/ i dont know why I don't see any error Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/ Using the URLconf defined in wisdompets.urls, Django tried these URL patterns, in this order: 1. admin/ 2. ^$ [name='home'] 3. ^adoptio

Can anyone please help?

2020-04-30 Thread Milson Munakami
Can anyone please help me to resolve this issue? https://stackoverflow.com/q/61514512/1316060 My url path in project's url.py is defined as follows: path('endpoint/', views.Endpoint.as_view(), name='get_endpoint'), The views.py include the following class to handle this routing: @method_decora

Re: App Dev wanted

2020-04-30 Thread Siddhartha Satyakama
I want to collaborate with your project. I have pretty much knowledge in Django have completed my internship in Django development with a Toronto based startup last week. Here is my GitHub, let me know if you want help from me. https://www.github.com/mrsidrdx/ On Wed, Apr 29, 2020, 7:38 PM Arne Bo

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread Sergei Sokov
так работает, но если я добавляю вот это для редактирования отображения полей в форме def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) #количество строк в поле комментариев self.fields['comment'].widget = Textarea(attrs={'rows': 3}) for fie

"detail": "CSRF Failed: Referer checking failed - no Referer."

2020-04-30 Thread shreehari Vaasistha L
hello i have deployed django app on aws . with https im getting error "detail": "CSRF Failed: Referer checking failed - no Referer." . But with http everything works fine. Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

Re: "detail": "CSRF Failed: Referer checking failed - no Referer."

2020-04-30 Thread shreehari Vaasistha L
Also csrf exempt is not making any difference On Thursday, April 30, 2020 at 6:48:36 PM UTC+5:30, shreehari Vaasistha L wrote: > > hello > i have deployed django app on aws . > with https im getting error "detail": "CSRF Failed: Referer checking > failed - no Referer." . But with http everything

How to count total number of student to display in template

2020-04-30 Thread Kushal Neupane
The following are the models and template where i wnat to display the count. The displayed is static. Now, i wanna make dynamic. Thank you. Help me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rec

RE: How to count total number of student to display in template

2020-04-30 Thread lumwakapuku
In you are view create a function Eg def student():       student = Student.objects.all()       Tt_student = student.count()        Context = { "student":student, "Tt_student":Tt_student }        Return render(request, "your templete here", context)In you templete render it as {{ Tt_student  }}

Re: How to count total number of student to display in template

2020-04-30 Thread Kushal Neupane
Thank you sir.😊 On Thu, Apr 30, 2020, 19:28 lumwakapuku wrote: > In you are view create a function > Eg > def student(): >student = Student.objects.all() >Tt_student = student.count() > Context = { "student":student, "Tt_student":Tt_student } > Return render(reque

Re: How to count total number of student to display in template

2020-04-30 Thread lumwakapuku
Okeyy you are welcomeSent from Samsung tablet. Original message From: Kushal Neupane Date: 30/04/2020 16:43 (GMT+03:00) To: django-users@googlegroups.com Subject: Re: How to count total number of student to display in template Thank you sir.😊On Thu, Apr 30, 2020, 19:28 lumwak

Re: "detail": "CSRF Failed: Referer checking failed - no Referer."

2020-04-30 Thread VenkataSivaRamiReddy
Send the url let me check On Thu, Apr 30, 2020, 18:49 shreehari Vaasistha L wrote: > Also csrf exempt is not making any difference > > On Thursday, April 30, 2020 at 6:48:36 PM UTC+5:30, shreehari Vaasistha L > wrote: >> >> hello >> i have deployed django app on aws . >> with https im getting er

Re: App Dev wanted

2020-04-30 Thread Andréas Kühne
Hi Arne, I would also be interested in helping you. I have 7 years of experience developing in Django and it sounds as though the solution is pretty easy to finish? Regards, Andréas Den ons 29 apr. 2020 kl 16:08 skrev Arne Bollinger : > Hey, > We came with a project out of a Covid-19 Hackatho

Reg: need helping hand on a real time project

2020-04-30 Thread 'Amitesh Sahay' via Django users
Hello All, I am working on a project, which happens to be a real time project, once completed would be deployed over the cloud. Therefore, I am looking for a helping hand who is willing to learn and get some real time experience.  But let me be very clear, it's not a very complex project, but goo

Re: "detail": "CSRF Failed: Referer checking failed - no Referer."

2020-04-30 Thread 'Amitesh Sahay' via Django users
Try the below link https://docs.djangoproject.com/en/3.0/ref/settings/ Sent from Yahoo Mail on Android Sent from Yahoo Mail on Android On Thu, 30 Apr 2020 at 19:35, VenkataSivaRamiReddy wrote: Send the url let me check On Thu, Apr 30, 2020, 18:49 shreehari Vaasistha L wrote: Also csrf ex

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread hend hend
Не совсем понимаю, это init какого класса...Но можно попробовать так: def __init__(self, *args, **kwargs): # delete 'user' from kwargs before calling perent init user = kwargs.pop('user', None) super().__init__(*args, **kwargs) #количество строк в поле комментари

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread Sergei Sokov
Так перестает работать первоначальная задача четверг, 30 апреля 2020 г., 18:14:38 UTC+2 пользователь hend hend написал: > > Не совсем понимаю, это init какого класса...Но можно попробовать так: > def __init__(self, *args, **kwargs): > # delete 'user' from kwargs before calling perent i

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread hend hend
Это init какой формы?..контроллер о котором мы говорим связан с формой OrderForm насколько я понял.. четверг, 30 апреля 2020 г., 20:00:57 UTC+3 пользователь Sergei Sokov написал: > > Так перестает работать первоначальная задача > > четверг, 30 апреля 2020 г., 18:14:38 UTC+2 пользователь hend h

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread hend hend
Кажется я понял, вы влепили два init в класс? А зачем... def __init__(self, *args, **kwargs): # get 'user' param from kwargs user = kwargs.pop('user', None) super().__init__(*args, **kwargs) # set class attrs for field in self.fields.values():

Re: I really need help pls assist this error

2020-04-30 Thread Jorge Gimeno
On Thu, Apr 30, 2020, 5:05 AM Listenable Music wrote: > 1st error in http://127.0.0.1:8000/ i dont know why I don't see any error > > Page not found (404) > Request Method: GET > Request URL: http://127.0.0.1:8000/ > > Using the URLconf defined in wisdompets.urls, Django tried these URL > pattern

Re: Can anyone please help?

2020-04-30 Thread 'Amitesh Sahay' via Django users
It should be Endpoint.as_view() Sent from Yahoo Mail on Android On Thu, 30 Apr 2020 at 17:35, Milson Munakami wrote: Can anyone please help me to resolve this issue? https://stackoverflow.com/q/61514512/1316060 My url path in project's url.py is defined as follows: path('endpoint/', view

Re: Can anyone please help?

2020-04-30 Thread Milson Munakami
Hi Sahay, That is already path('endpoint/', views.Endpoint.as_view(), name='get_endpoint'), On Thu, Apr 30, 2020 at 1:15 PM 'Amitesh Sahay' via Django users < django-users@googlegroups.com> wrote: > It should be Endpoint.as_view() > > Sent from Yahoo Mail on Android >

Re: Can anyone please help?

2020-04-30 Thread 'Amitesh Sahay' via Django users
I think "views." is incorrect. It should not appear as prefix. However , it also depends on how you have impoted  Did you import as below? from views import view_name OR import views Sent from Yahoo Mail on Android On Thu, 30 Apr 2020 at 23:52, Milson Munakami wrote: Hi Sahay, That is al

Re: Can anyone please help?

2020-04-30 Thread 'Amitesh Sahay' via Django users
You can also try keeping the same name for the endpoint as below path('endpoint/', views.Endpoint.as_view(), name='endpoint'), Sent from Yahoo Mail on Android On Thu, 30 Apr 2020 at 23:52, Milson Munakami wrote: Hi Sahay, That is already path('endpoint/', views.Endpoint.as_view(), name='ge

Re: Can anyone please help?

2020-04-30 Thread Milson Munakami
Amitesh, My class Endpoint(View)is imported from :from django.views import View Class level view even I tried to use function level view it is showing same problem in get the *request.user *is something *authenticated *but in post the *user session is lost.* On Thu, Apr 30, 2020 at 1:33 PM 'Amite

Re: Can anyone please help?

2020-04-30 Thread Milson Munakami
But when I refresh the page it shows I am still logged in user. Only problem is when the external page redirects it can't see the logged in user. SOmething in setting am I missing per as you can see all *Middlewares *are included correctly!. On Thu, Apr 30, 2020 at 1:38 PM Milson Munakami wrote:

Re: Can anyone please help?

2020-04-30 Thread Milson Munakami
I am importing app level views like this in `urls.py` from . import views On Thu, Apr 30, 2020 at 1:35 PM 'Amitesh Sahay' via Django users < django-users@googlegroups.com> wrote: > You can also try keeping the same name for the endpoint as below > > path('endpoint/', views.Endpoint.as_view(), nam

Need help in Django calculated field/queryset

2020-04-30 Thread Jay Prajapati
Hello everyone, Still stucked on this pointHas anyone tried it? -- 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. T

Re: How to use ModelChoiceField? I whould like to filter the output from a field form.

2020-04-30 Thread Sergei Sokov
Действительно!! А я и не заметил. Благодарю от всего сердца!!! Это будет слишком нагло с моей стороны, но можно ли ваш контакт, чтобы вас (или тебя) на прямую спрашивать разные вопросы касаемо джанго, я совсем новичок в этом деле и, например, этот вопрос задавал на разных форумах, но никто мне не

sphinx inside

2020-04-30 Thread Kai Kobschätzki
Hi, I installed sphinx and I get an documentation in project_main/docs/_build/html, starting with html/index.html. In so far - fine. Now I want to present this documents inside my project so I can see in the nav-bar a "doc" where I can see them. But I have no idea how to start it. I tried it with

Re: App Dev wanted

2020-04-30 Thread Shyam Acharjya
I would like to discuss more about what you want this project to be. I can surely be of assistance so hit me in chat and we can go from there. On Thu, Apr 30, 2020 at 8:04 PM Andréas Kühne wrote: > Hi Arne, > > I would also be interested in helping you. I have 7 years of experience > developing

Re: sphinx inside

2020-04-30 Thread Amit Gupta
Hii If u want to just add your file in your django project u can probably copy and paste the file in your project file and after that you can successfully use your file in the project by just writing the name of your file with correct extension On Fri, 1 May, 2020, 1:29 AM Kai Kobschätzki, wrote

Re: App Dev wanted

2020-04-30 Thread Amit Gupta
Hii I wish your project will be completed soon If wanna help u can contact me and send the details about remaining work I would try to help Regards Amit Gupta On Wed, 29 Apr, 2020, 7:38 PM Arne Bollinger, wrote: > Hey, > We came with a project out of a Covid-19 Hackathon that we could not > fin