Admin case-insensitive sorting question

2018-01-09 Thread Mike Dewhirst
I have tried every which way to produce a case-insenstive list of substances in the Admin including this: def get_queryset(self, request):     return super(SubstanceAdmin, self).get_queryset(request).order_by(Lower('name').asc()) Which DOES work (as proven via print statement) but doesn't dis

Re: I can't install easy install

2018-01-09 Thread Peter of the Norse
This is the second time I’ve seen this and need to let you know it’s not true. PowerShell doesn’t have elevated permissions, it’s just bash for .NET. While there are a bunch of new scripting features built into it, it has no effect on Python* or any other commands you might run. - Peter of th

Re: Convert Excel code to Python

2018-01-09 Thread BIJAL MANIAR
Hi, Thanks all for reply. Since it is an old application there is no documentation for it. I will have to do Reverse Engineering by looking at vbscript code and gathering requirements. Total there are 40 screens. A single form has 20-30 input parameters to select from and generate output depend

Re: Django how to make user model username unique=False

2018-01-09 Thread cherngyorng
The reason is because i want to add some user without entering their username. As i manage to allow null input for username but the unique for username make it an error if i add another user without username. These user are used for adding family member. For eg creating a 3 years old baby profi

Re: Django how to make user model username unique=False

2018-01-09 Thread cherngyorng
Thanks for these improvement. But the main thing i want is to make username field unique = false On Tuesday, January 9, 2018 at 5:39:32 PM UTC+9, chern...@gmail.com wrote: > > I am trying to make username unique = false as there are cases where > username is not needed. Since i am using email ad

Re: Convert Excel code to Python

2018-01-09 Thread John Fabiani
There are several libs available that deal with excel. I normally just use xlwt. But, if memory serves, xlwing does something with vba. I've never used xlwing so I might completely wrong. Either way check out all the python libs for excel. Johnf On Tue, Jan 9, 2018 at 4:27 PM, RM T wrote: >

Newbie : Help for using RequestContext

2018-01-09 Thread Mickael . barbo
Hello to all Django users :-) I'm new to Django and this is my first post. I'd like to implement breadcrumbs on all my pages. My strategy is to create a middleware and to use RequestContext to add a dict to the context of each request then use the context in my html My problem is that I don't u

Re: Convert Excel code to Python

2018-01-09 Thread RM T
Use third-party libraries 在 2018年1月9日星期二 UTC+8下午9:15:55,BIJAL MANIAR写道: > > > Hi, > > There is an old application in Excel where macros are coded in VBScript > and there is both frontend (forms) and backend in Excel. Need to replicate > it as a web application (Python, Django, React). From scrat

Re: Can you people explain why the def _str_() method is used below?

2018-01-09 Thread Furbee
Who you call "you people?" Just kidding. On Tue, Jan 9, 2018 at 11:27 AM, wrote: > Thanks alot James and Projec.Your posts were very helpful to me. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop

Re: Can you people explain why the def _str_() method is used below?

2018-01-09 Thread utpalbrahma1995
Thanks alot James and Projec.Your posts were very helpful to me. -- 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 po

Django test command with --parallel

2018-01-09 Thread Yevhen Yevhen
I try to run my django tests using --parallel flag but get the following error (pastebin) . How can I fix this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving ema

Re: Convert Excel code to Python

2018-01-09 Thread Jason
Are you able to write the code yourself? Might be better that way. -- 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

Re: urlopen error [Errno 110] Connection timed out

2018-01-09 Thread Jason
Are you able to load the URL directly in the browser without issue? How about using an API client like Postman? -- 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

Convert Excel code to Python

2018-01-09 Thread BIJAL MANIAR
Hi, There is an old application in Excel where macros are coded in VBScript and there is both frontend (forms) and backend in Excel. Need to replicate it as a web application (Python, Django, React). From scratch, have to build it in python. I have checked vb2py library is there for code conve

Re: urlopen error [Errno 110] Connection timed out

2018-01-09 Thread suase9303
Thanks.! I had better use an async task worker! i need to study the worker... the error happens with a specific URL. 2018년 1월 9일 화요일 오후 8시 7분 15초 UTC+9, Jason 님의 말: > > You really should use an async task worker like Celery for this, to get > the scraping outside of Django's request-response

Re: Django rest framework foreign key display details from table 1 to table 2

2018-01-09 Thread Jason
What you are looking for is nested serialization. There's a section in the DRF docs on this that should provide some light. Fortunately, your serializers are almost there. -- You received this message because y

Re: urlopen error [Errno 110] Connection timed out

2018-01-09 Thread Jason
You really should use an async task worker like Celery for this, to get the scraping outside of Django's request-response loop. Is the urlopen happening with any specific URL or seemingly at random? -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Error following django's documentation 2.0

2018-01-09 Thread FernandoJMM
Good morning, I think the error comes from making modifications to django's settings. I started the project again and now the django shell works. Thanks for your interest !!! Fernando El sábado, 6 de enero de 2018, 7:51:01 (UTC+1), Matemática A3K escribió: > > > > On Fri, Jan 5, 2018 at 8:32 PM,

Re: Django how to make user model username unique=False

2018-01-09 Thread Andréas Kühne
Hi, This is how I created my User model that does what you require: class User(AbstractBaseUser, PermissionsMixin, AuditableModel): first_name = models.CharField(_('first name'), max_length=30, blank=True) last_name = models.CharField(_('last name'), max_length=30, blank=True) email =

Re: How do I make a Django model from a tab-delimited data file?

2018-01-09 Thread Andréas Kühne
Kasper, You are correct :-), I just assumed (probably incorrectly) that the data was just like his example - in that case it would have been easiest :-) Regards, Andréas 2018-01-09 9:27 GMT+01:00 Kasper Laudrup : > Hi, > > On 2018-01-09 08:09, Andréas Kühne wrote: > >> You will have to parse t

Re: Managing a process from Django

2018-01-09 Thread Kasper Laudrup
Hi Antonis, On 2018-01-09 07:14, Antonis Christofides wrote: Ah, OK, sorry I didn't read all the discussion. So I guess that if you keep that in a global variable, it won't work if your Django app is running in many processes. (Besides, global variables are rarely a good idea.) I agree comple

Django how to make user model username unique=False

2018-01-09 Thread cherngyorng
I am trying to make username unique = false as there are cases where username is not needed. Since i am using email address to login. But with the django user model, how do i customise it ? Here is the code for my current user model: from django.db import models from django.contrib.auth.models

Re: How do I make a Django model from a tab-delimited data file?

2018-01-09 Thread Kasper Laudrup
Hi, On 2018-01-09 08:09, Andréas Kühne wrote: You will have to parse the CSV file manually with a custom management command (at least that is what I would do). All you need to do is open the file, split each row with a "," and then  import the correct columns to the model. Unfortunately, CSV