Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread Krishnasagar Subhedarpage
Hi Prateek, Did you check disk info of server instance? What's disk consumption? Regards, Krishnasagar Subhedarpage On Thu, 15 Nov 2018 at 12:09, prateek gupta wrote: > It is strange again, now I am getting the same error. > Till morning it was working fine but now it is again showing same

Re: Django jobs

2018-11-14 Thread Ryan Gedwill
Yeah, it’s hard to just learn the pythonic way of doing things. It’s a mix of functional and OOP practice with a bunch of built in stuff that you wouldn’t know unless you came across it. This is kind of why python can come across as a cult sometimes ;) One book that I recommend for learning som

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread prateek gupta
It is strange again, now I am getting the same error. Till morning it was working fine but now it is again showing same error. On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason wrote: > > also, you might want to update your mysqlclient package. 1.3.12 was > released over a year ago,

How to fix (2027, 'Malformed packet') exception?

2018-11-14 Thread prateek gupta
Hi All, I am facing a strange issue in my pre-prod server (in dev and uat it's working fine). Whenever I login in django admin and click on any table, it shows me following error- (2027, 'Malformed packet') [image: db_error.JPG] Is there any db setting I am missing here or its is related to se

Re: Django jobs

2018-11-14 Thread Mike Dewhirst
On 15/11/2018 2:28 PM, Joel Mathew wrote: The last point is a bit of a sore for me. I'm well versed with some other languages including perl, C, and javascript. Python seems to have "pythonic" ways of doing stuff that's at loggerheads with all other languages. Is there a single resource to lear

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread prateek gupta
Thanks Jason! I have restarted teh server and updated the mysqlclient to 1.3.13 and the issue got resolved now. On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason wrote: > > also, you might want to update your mysqlclient package. 1.3.12 was > released over a year ago, and 1.3.13 was

Re: Why does my Django project open the same home page irrespective or which url I type?

2018-11-14 Thread Manjunath
Also, It would be better if you rearrange your patterns. urlpatterns=[ path('login/', LoginView.as_view(template_name='accounts/login.html'), name='login'), re_path(r'^$',views.home, name='home'), ] Since your path *r'^$' *matches all request, it is better to keep this at end of your list. On

Re: Django jobs

2018-11-14 Thread Joel Mathew
The last point is a bit of a sore for me. I'm well versed with some other languages including perl, C, and javascript. Python seems to have "pythonic" ways of doing stuff that's at loggerheads with all other languages. Is there a single resource to learn the pythonic way of doing things? Like, say

Re: Django jobs

2018-11-14 Thread Ryan Gedwill
No problem! Also as a side note to the point that you heard django is slow... Django is extremely scalable, which of course requires speed. It’s probably the most popular web framework among startups of any magnitude (at least from what I’ve seen) by a mile. Django certainly may require some

Re: Django jobs

2018-11-14 Thread Arturo Fernandez
Thanks :) On Wednesday, November 14, 2018 at 9:41:35 PM UTC-5, Ryan Gedwill wrote: > > I live in the SF Bay Area and there are no shortage of jobs in Django. It > is true there are also plenty of jobs in Node, but you can’t compare a > framework to a backend language. I see far more python jobs

Re: Sending PDF from javascript to django

2018-11-14 Thread Joel Mathew
Thank you. I decided to go with reportlab since it seems to be really powerful and doesnt require a headless browser. The options it has seem similiar (at least superficially) to the way I'm coding js in pdfjs. Thank you for your input. This was a XY problem after all. I should never have thought a

Re: Django jobs

2018-11-14 Thread Ryan Gedwill
I live in the SF Bay Area and there are no shortage of jobs in Django. It is true there are also plenty of jobs in Node, but you can’t compare a framework to a backend language. I see far more python jobs than node jobs. 2 things to keep in mind though (for reference I’m a python/Django dev but

Re: Why I can't pass anything to my html? Django 2.1

2018-11-14 Thread Rookies DJ
Hi Amit pant I'm sorry how do that (make dictionary for display variables using html) Maybe you could give me some sample code? On Monday, 12 November 2018 23:39:26 UTC+8, amit pant wrote: > > you need to make dictionary for display variables using html > > On Mon, Nov 12, 2018 at 6:57 PM Cune

Django jobs

2018-11-14 Thread Arturo Fernandez
Hello community, today someone at work told me to bare in mind which tech I use in terms of profitability. As a backend language, there is no doubt that I'll use Python, however I'm doubting about the framework, whether I should use Python or not for web. I heard that Django is kind of slow, an

Re: Channels + django-tenants

2018-11-14 Thread Andrew Godwin
Hm, that's not sufficiently better than just supplying a new middleware to be honest. The sort of hooks I prefer are where you can subclass and improve what we ship with and give the user a new, non-fragile one, whereas that just sounds like it's injecting a function in. Honestly, given Channels i

Re: Bokeh Server via Django Tutorial

2018-11-14 Thread Kirubel Tadesse
Hi Jonathan Could you please explain to me where you are starting the bokeh server I see that you are creating a session. I tried to the same thing I keep on getting an error message. I just want to understand how you are starting the Bokeh server and if there is a way to know if bokeh serve has

Backend for django-cache using dynamodb

2018-11-14 Thread Ezequiel Bertti
Hi, I was thinking of using dynamodb as a django cache backend. But I did not find any lib. What do you think about this idea? -- Ezequiel Bertti https://telegram.me/ebertti https://twitter.com/ebertti https://github.com/ebertti -- You received this message because you are subscribed to the

Re: How do I store details securely with django?

2018-11-14 Thread Lance Haig
Hi Dev, I believe that it would not provide much more security around the details. Thank you for responding. Regards Lance On 11/13/18 4:55 AM, Devender Kumar wrote: Hi Study about LDAP protocol Regards Dev On Tue 13 Nov, 2018, 4:06 AM PASCUAL Eric wrote:

Re: How do I store details securely with django?

2018-11-14 Thread Lance Haig
Thanks Eric, I did not explain myself properly so the mistake was mine. Thanks for the help. Lance On 11/12/18 11:35 PM, PASCUAL Eric wrote: Hi Lance, Well, I was off topic. Sorry for this :/ I understand your need better now. There are chances you've already thought to this option

Re: How do I store details securely with django?

2018-11-14 Thread Lance Haig
Thanks I will take a look at that Lance On 11/13/18 6:29 AM, Mike Dewhirst wrote: Another thought Django admin has a built-in mechanism for password management. It includes forms with password widgets.Perhaps you could hack your own encryption of the cloud credentials based on the Django a

RE: Sending PDF from javascript to django

2018-11-14 Thread Matthew Pava
There is django-hardcopy. However, I’m in process of changing my PDF generation algorithm. I originally used PhantomJS with gs-print and gs-view for Windows. Unfortunately, PhantomJS has been discontinued, and it wasn’t taking advantage of rendering changes to HTML (especially for printing or

How to get multiple values from a template and update multiple fields in a rows of thesame table in django

2018-11-14 Thread AI
I am working on a result processing website and I've been trying to update multiple fields in each row of table. User should be able to input updated CA Score and EXAM Score values and it should update each student's CA Score and EXAM Score values which has been submitted. image of my page

using permission required

2018-11-14 Thread Akash utreja
I am trying to use permission required decorator using authorization header.And it always gives me 302 error. although my user has permission for it.Kindly help I am beginner to django. Here is my code @permission_required('access_admin', login_url=None) @permission_classes((IsAuthenticated,)) @

How to get multiple values from a template and update multiple fields in a rows of thesame table in django

2018-11-14 Thread AI
I am working on a result processing website and I've been trying to update multiple fields in each row of table. User should be able to input updated CA Score and EXAM Score values and it should update each student's CA Score and EXAM Score values which has been submitted. image of page

Re: Is Django REST framework a part of Django?

2018-11-14 Thread Yarving Liu
You can treat DRF as a Django package, though it's not a part of django. DRF is the best RESTFul framework I've ever seen, and with great integration with Django. On Mon, Nov 12, 2018 at 8:13 PM Bill Watkins wrote: > Good day, > > I've read an article about Django REST framework, and have a que

about unique_together

2018-11-14 Thread 胡超
class QdProjectAssist(models.Model): ''' 页面推荐 ''' # id = models.AutoField('主键', primary_key=True) project_id = models.ForeignKey('QdProject', verbose_name='项目', on_delete=models.CASCADE) assist_id = models.ForeignKey('QdAssist', verbose_name='正文', on_delete=models.CASCA

Re: Sending PDF from javascript to django

2018-11-14 Thread Joel
Ideally I would love to generate the pdf on the server. Hovered I am yet to discover an easy way to create a pdf easily with the ease of jspdf's table plugin. Perhaps someone can shed light on a good python library to do this without much ado. On Wed, 14 Nov, 2018, 7:12 PM Jason your original er

Re: Sending PDF from javascript to django

2018-11-14 Thread Jason
your original error was due to exceding django's max upload size. check out https://docs.djangoproject.com/en/2.1/ref/settings/#data-upload-max-memory-size also, you should check out https://djangopackages.org/grids/g/pdf/ What I would do is generate the pdf in the view from a rendered templat

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread Jason
also, you might want to update your mysqlclient package. 1.3.12 was released over a year ago, and 1.3.13 was pushed out late June of this year. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread Jason
just checking, but did you restart the mysql server after setting that max_allowed_packet setting? It won't stick without a restart. -- 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

How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread prateek gupta
Hi All, I am using Django 2.0.6, Python 3.6. For connecting with Mysql 5.7 I am using mysqlclient 1.3.12. Using above environment I have created an admin panel for CRUD operations. When I select a tabel for viewing it's content following error shows- django.db.utils.OperationalError: (2013, 'Los

Re: Sending PDF from javascript to django

2018-11-14 Thread Joel Mathew
I tried the following: def myhandle_uploaded_file(f): with open('some/file/name.txt', 'wb+') as destination: for chunk in f.chunks(): destination.write(chunk) def SendPrescriptionbyMail(request, cliniclabel, patient_id): patient_id = int(patient

Sending PDF from javascript to django

2018-11-14 Thread Joel Mathew
I use jspdf to generate pdf for downloading by end users. I wish to add a function to let them send an email to themselves through the server. Reading a little bit, I've seen a method to send the pdf to the server as a base encoded string, and then have the server decode it, before emailing the obj