Re: Phone Number Validation

2018-03-15 Thread Bernd Wechner
Not really a Django question, just basic Python. For starters strip() will remove only leading and trailing chars in the set, not embedded chars. Curiously though, with all due respect, this: if dataless.isdigit() != True: has beginner written all over it. What's wrong with: if not

Phone Number Validation

2018-03-15 Thread Carl Brubaker
I'm trying to make my own phone number form, and I'm having trouble with number validation. Since international numbers can use "(40) (30)" I want to check that only numbers were entered. I can't seem to make it work though. def clean_international(self): data =

Re: tutorial 2.0 - 1: problem

2018-03-15 Thread Bernd Wechner
Looks to me like runserver is telling you more or less what's up. What it's not telling you is what you've not told us, namely teh URL you're navigating to. But the tutorial suggests " http://localhost:8000/polls/; and if you are using that, and you have set up

Re: tutorial 2.0 - 1: problem

2018-03-15 Thread Carl Brubaker
We could use some code from your myapp/urls.py and your myapp/polls/urls.py files. Without it, we don't know what is wrong. On Thursday, 15 March 2018 20:03:57 UTC-4, Denny Terreno wrote: > > Hello, > I'm new to django, and I'm trying to learn it, but I'm stuck on the 1st > part of the

tutorial 2.0 - 1: problem

2018-03-15 Thread Denny Terreno
Hello, I'm new to django, and I'm trying to learn it, but I'm stuck on the 1st part of the tutorial: https://docs.djangoproject.com/en/2.0/intro/tutorial01/ when I try the polls app it gives me "*Page not found (404) Using the URLconf defined in mysite.urls, Django tried these URL patterns, in

Re: chemistry character set

2018-03-15 Thread Mike Dewhirst
On 16/03/2018 12:40 AM, Peter of the Norse wrote: I ran into a similar problem with one of my projects; people were using Greek and Cyrillic letters and other symbols to be cute.  It’s all in English, but they kept doing things like using ß for B and ¥ for Y.  And then expecting to be able to

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-15 Thread Bernd Wechner
Mathtew, Yes I most certainly have. I use them elsewhere. i love SubQuery. But I can only find examples and documentation about using them in the WHERE clause (or a filer() arguments). If you can write me an example of how one might be used in the FROM clause as in my example below I'd be

Re: UUIDs eventually choke as primary key

2018-03-15 Thread M Mackey
Well, I don't seem to be able to get around this. I'm going to have to switch away from using a UUID as a primary key, which fortunately doesn't seem like too much work. On Thursday, March 1, 2018 at 8:53:13 AM UTC-8, M Mackey wrote: > > I added some debug support, and there are only two

Re: How to add an OR criterion to an existing QuerySet?

2018-03-15 Thread Simon Charette
Bernd, Glad you managed to achieve what you were after! Combination of querysets is definitely an obscure part or the ORM API. I couldn't even find a single mention of it in the documentation even if I know it's supported. It might be worth opening a ticket about it if you can't find any

RE: Fetching next and/or prior objects given an arbitrary ordering

2018-03-15 Thread Matthew Pava
Did you look at the Subquery expression? https://docs.djangoproject.com/en/2.0/ref/models/expressions/#subquery-expressions From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Bernd Wechner Sent: Thursday, March 15, 2018 1:57 AM To: Django users Subject: Re:

Re: chemistry character set

2018-03-15 Thread Peter of the Norse
I ran into a similar problem with one of my projects; people were using Greek and Cyrillic letters and other symbols to be cute. It’s all in English, but they kept doing things like using ß for B and ¥ for Y. And then expecting to be able to search the way they way it looks. So I am doing

Re: Resolved a problem with FireFox 59.0 (64-bit)

2018-03-15 Thread Mike Dewhirst
On 15/03/2018 6:15 PM, Mike Dewhirst wrote: Since getting Firefox 59.0 yesterday some of my sites were not displaying properly. They work normally in Chrome. Admin sites are working OK. Looking at 'View source' everything is there but just not rendered. Comparing source between my efforts

Re: how to direct image to amazon s3 in django 2.0 using models in admin please help me

2018-03-15 Thread Andréas Kühne
Hi, Use django-storages with a regular FormField and you can create an admin model for the model you need. See here: https://simpleisbetterthancomplex.com/tutorial/2017/08/01/how-to-setup-amazon-s3-in-a-django-project.html Med vänliga hälsningar, Andréas 2018-03-15 6:59 GMT+01:00 arvind

Resolved a problem with FireFox 59.0 (64-bit)

2018-03-15 Thread Mike Dewhirst
Since getting Firefox 59.0 yesterday some of my sites were not displaying properly. They work normally in Chrome. Admin sites are working OK. Looking at 'View source' everything is there but just not rendered. Comparing source between my efforts and those of the Admin I saw a difference

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-15 Thread Bernd Wechner
Well the silence was stunning, so I pottered along and have a working solution. Alas I lean on a raw() call which I'd rather not. If there is any way to do this in the ORM I'd love to know. Otherwise I'm probably off to submit it as a feature request. The Window functions will all suffer this

Re: How to add an OR criterion to an existing QuerySet?

2018-03-15 Thread Bernd Wechner
Simon, Thanks enormously. A little experimentation and I got that to work! Brilliant. Am most pleased it was possible. Good ol' Django to the rescue. The thing I got stuck on for a bit was an assertion failure because qs was DISTINCT and the or'ed qs was not (the or operation raises a rather

how to direct image to amazon s3 in django 2.0 using models in admin please help me

2018-03-15 Thread arvind yadav
how to direct image to amazon s3 in django 2.0 using models in admin i want upload image in django admin without using form or using form please help me as soon as possible thank -- You received this message because you are subscribed to the Google Groups "Django users" group. To