chemistry character set

2018-02-05 Thread Mike Dewhirst
slugify to include a table of equivalences between Greek and Western chars but that doesn't necessarily cater for non-Western character sets. Maybe an ever expanding table of equivalences? Thanks for any ideas ... Mike -- You received this message because you are subscribed to the Google Groups

Re: javascript transpilers

2018-02-05 Thread Mike Dewhirst
Much appreciated. I'll definitely take your advice. Cheers M On 6/02/2018 2:26 AM, Matemática A3K wrote: On Thu, Feb 1, 2018 at 8:27 PM, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote: On 2/02/2018 12:54 AM, Jason wrote: https://caniuse.com/#feat=wasm

Re: In the Admin, Is it possible to make filters on foreign keys usable with lots of related objects?

2018-02-02 Thread Mike Dewhirst
On 3/02/2018 5:23 AM, Paul Tiplady wrote: Currently it's simple to configure a filter on a foreign key in the admin: `list_filter = ['theforeignkeyfield']` However in practice this is barely usable in most cases that I've encountered, since the admin uses RelatedFieldListFilter, which fetche

Re: javascript transpilers

2018-02-01 Thread Mike Dewhirst
On 2/02/2018 12:54 AM, Jason wrote: https://caniuse.com/#feat=wasm  IIRC wasm is not polyfillable or transpilable, so if you're targeting users on any of those red cells, then wasm is not for you. Agreed. I think it is interesting anyway but I already decided it is not within my event horiz

Re: javascript transpilers

2018-02-01 Thread Mike Dewhirst
hat method should (when successful) add the message? Thank you Andréas. That works nicely. I hadn't used it before. Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails f

Re: javascript transpilers

2018-01-31 Thread Mike Dewhirst
to:django-users@googlegroups.com] On Behalf Of Mike Dewhirst Sent: Wednesday, January 31, 2018 4:29 PM To: django-users@googlegroups.com Subject: Re: javascript transpilers On 30/01/2018 6:33 PM, Andréas Kühne wrote: 2018-01-30 5:18 GMT+01:00 Mike Dewhirst mailto:mi...@dewhirst.com.au>>: On 29/

Re: javascript transpilers

2018-01-31 Thread Mike Dewhirst
On 30/01/2018 6:33 PM, Andréas Kühne wrote: 2018-01-30 5:18 GMT+01:00 Mike Dewhirst <mailto:mi...@dewhirst.com.au>>: On 29/01/2018 9:03 PM, Nick Sarbicki wrote: Going SPA when you don't know JS is very much a baptism of fire. Angular is personally my fav

Re: javascript transpilers

2018-01-29 Thread Mike Dewhirst
all for the excellent and very professional feedback. Cheers Mike On Mon, Jan 29, 2018 at 9:15 AM Andréas Kühne mailto:andreas.ku...@hypercode.se>> wrote: If that is the case - I would recommend looking into creating a single page app - with Django restframework on the back

Re: javascript transpilers

2018-01-28 Thread Mike Dewhirst
; wrote: Hi, You don't describe to what extent you need to use JavaScript - IOW, what problem you need to solve with JavaScript? Depending you needs you might get away with basic knowledge and usage of some helpful JavaScript library/framework.

javascript transpilers

2018-01-27 Thread Mike Dewhirst
the topic? I am self-employed  with multiple demands on my time so I cannot afford to allocate sufficient time to learn it let alone undertake formal Javascript training. My hope is to pick it up by osmosis and wonder if a transpiler would help. Thanks for any pointers Mike -- You received t

Re: How do I exactly change from SQLite to MySQL ?

2018-01-15 Thread Mike Dewhirst
n for Django if you want stability with scalability and atomicity. YMMV Mike On 15/01/2018 10:44 PM, Julio Biason wrote: Hi Daniel, Well, in simple terms, all you need to do is change the DATABASE setting in your settings (here https://www.coderedcorp.com/blog/django-settings-for-mul

Re: Asynchoronous programming and websockets support

2018-01-11 Thread Mike Dewhirst
On 12/01/2018 11:05 AM, muratsert1...@gmail.com wrote: Hello Django community, This is my first post so forgive me if this is out of context or have been discussed already. I've been working with Django for many years and although have the neccesary experience with Javascript I don't want to

Re: I plan to have lots of data tables with similar structure. How do you recommend I model them?

2018-01-10 Thread Mike Dewhirst
tables set up with fields which are not in CoreFields ... class DataSetX(CoreFields):     ... You can also move any methods in common into CoreFields hth Mike Here's a couple examples of tab-delimited text files I'll import. |     NAME S1903_C02_001E state county tract State-Count

Re: Admin case-insensitive sorting question

2018-01-10 Thread Mike Dewhirst
On 11/01/2018 10:53 AM, Mike Dewhirst wrote: On 11/01/2018 1:22 AM, Matthew Pava wrote: If I'm understanding you correctly, you could use a callable in the list_display definition. That is what I'm doing. Unfortunately a callable for a list_display column prevents sorting the li

Re: Admin case-insensitive sorting question

2018-01-10 Thread Mike Dewhirst
ing. Maybe adjusting the model __str__() method to always uppercase the first char of the name will work. I'll have to back out all the adjustments so far and give it a try. I'll report back. Thanks Mike https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.Mod

Re: Handling secret keys in digitalocean

2018-01-10 Thread Mike Dewhirst
little python program getcreds.py to go fetch the data as required in settings. Works for me. Cheers Mike #getcreds.py # -*- coding: utf-8 -*- # Copyright (C) 2017 Climate Pty Ltd # This is free software subject to the terms of the GNU GPL v3 """ getcreds returns secret info whi

Admin case-insensitive sorting question

2018-01-09 Thread Mike Dewhirst
is ... should I bite the bullet and add a sort field to the model and fill it with the substance name converted to lower-case? Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Re: Simple file uploading app

2018-01-08 Thread Mike Morris
Though it is not a Drupal app, there is an excellent drop box type app in PHP called "Download Ticket Service"... simple, no frills, entirely cross-platform and open: http://www.thregr.org/~wavexx/software/dl/ I have no idea if it could be readily incorporated into your app, but just FYI

Re: Wich OS for develop?

2018-01-02 Thread Mike Morris
I've been linux only for many years - the last Windows I used was 2000 Professional so you can guess my recommendation on OS :-) As for IDE, I found "Eric 6" (https://eric-ide.python-projects.org/), which is pretty great, and free. Installation was bumpy since it has some pre-requisites, b

Re: Django: text, font, and style

2018-01-01 Thread Mike Dewhirst
afe }} You still need the safe filter because renderable_text still has genuine html which you want the browser to recognise - even though bleach may have converted some disallowed tags. https://docs.djangoproject.com/en/1.11/howto/custom-template-tags/#filters-and-auto-escaping Cheers Mike

Re: Still having trouble with django-filebrowser

2017-12-29 Thread Mike Dewhirst
Etienne TINYMCE_FILEBROWSER = True Did the trick. Vous etes fantastique! :)) Mike On 30/12/2017 10:11 AM, Etienne Robillard wrote: Hey Mike, Please take a look at this: https://stackoverflow.com/questions/3231432/admin-field-fails-to-save-with-tinymce-and-filebrowser-in-django Best

Re: Still having trouble with django-filebrowser

2017-12-29 Thread Mike Dewhirst
11.5 chardet==3.0.4 Django==1.11.8 django-filebrowser-no-grappelli==3.7.3 django-tinymce4-lite==1.7.0 html5lib==1.0.1 idna==2.6 jsmin==2.2.2 olefile==0.44 Pillow==4.3.0 psycopg2==2.7.3 pytz==2017.3 requests==2.18.4 six==1.11.0 urllib3==1.22 webencodings==0.5.1 ... doesn't make any difference.

Re: Still having trouble with django-filebrowser

2017-12-28 Thread Mike Dewhirst
ache Email: django.core.mail.backends.smtp.EmailBackend Site ID:   3 - Development sys.path:  C:\Users\mike\envs\xxct3\train    C:\Users\mike\envs\xxct3\Scripts\python36.zip    C:\python36\DLLs    C:\python36\lib    C:\python36    C:\Users\mike\envs\xxct3    C:\Users

Re: Still having trouble with django-filebrowser

2017-12-28 Thread Mike Dewhirst
g I'm doing somewhere which is causing it. Thank you very much for responding. I reckon it sometimes makes the difference between giving up (well, working around) and persisting. Cheers Mike On 18/12/2017 11:26 PM, Mike Dewhirst wrote: On 18/12/2017 8:23 PM, Etienne Robillard wrote: L

Re: Still having trouble with django-filebrowser

2017-12-18 Thread Mike Dewhirst
I'm confused whether it is a constraint to keep the uploader confined on the source machine or perhaps the area for upload storage on the web server - which would be a download - and anyway that is the MEDIA_ROOT I suspect. Thanks Mike On 18/12/2017 11:26 PM, Mike Dewhirst wrote: On 18/12

Re: Still having trouble with django-filebrowser

2017-12-18 Thread Mike Dewhirst
How can I test for valid html? View source and inspect it manually? Which I just did and it looks ok. Thanks for sticking with this. I appreciate it. It is bedtime here. Cheers Mike HTH Etienne Le 2017-12-17 à 22:06, Mike Dewhirst a écrit : This time with version 3.9.2 having climbed a lit

Re: Still having trouble with django-filebrowser

2017-12-17 Thread Mike Dewhirst
This time with version 3.9.2 having climbed a little higher into the branches ... C:\Users\mike\envs\xxct3\lib\site-packages\django_filebrowser-3.9.2-py3.6.egg\filebrowser\sites.py:12: RemovedInDjango20Warning: Importing from django.core.urlresolvers is deprecated in favor of django.urls

Re: Still having trouble with django-filebrowser

2017-12-17 Thread Mike Dewhirst
On 18/12/2017 9:28 AM, Etienne Robillard wrote: Hi Mike, What Django version are you using? Is this happening with Python 2 or 3? Sorry Etienne. Should have mentioned that. Python 3.6 but it also needs to work with Py27 Django 1.11.8 Have you tried to turn on Python warnings? C

Still having trouble with django-filebrowser

2017-12-17 Thread Mike Dewhirst
ialog. I also uninstalled and reinstalled to no effect. Thanks for any help Mike On Saturday, December 16, 2017 at 7:04:34 PM UTC+11, Mike Dewhirst wrote: > > I have tried both django-filebrowser and django-filebrowser-no-grappelli > with django-tinymce4-lite > > The TinyM

Re: having trouble with django models

2017-12-17 Thread Mike Dewhirst
fields you wish to display as indicated below and - based on Daniel's advice above - you might need to include ... readonly_fields = ['timestamp', 'updated'] On 17/12/2017 8:18 AM, Mike Dewhirst wrote: On 16/12/2017 10:06 PM, Mukul Agrawal wrote: Hello, I am newbie to dja

Re: having trouble with django models

2017-12-16 Thread Mike Dewhirst
On 16/12/2017 10:06 PM, Mukul Agrawal wrote: Hello, I am newbie to django. I was trying my hand on models. When i used the below code in models.py, "timestamp" and "updated" are not able visible on admin site. Is something wrong with the code? It looks OK to me. Have you included them in your

Having trouble with django-filebrowser

2017-12-16 Thread Mike Dewhirst
  url(r'^admin/', admin.site.urls), Any hints appreciated .. Thanks Mike -- 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+uns

Re: Django field model for HTML parser?

2017-12-14 Thread Mike Dewhirst
On 15/12/2017 3:19 PM, drone4four wrote: Thank you Mike for the help. I'll look into bleaching my HTML.  Great doc. So it's easy but not recommended to enable all HTML.  I've got alotta custom legacy  code with dividers and elements with classes and such which I intend on tryi

Re: I can't install easy install

2017-12-14 Thread Mike Dewhirst
On 15/12/2017 8:52 AM, Henry Ogunkomaya wrote: Hello guys! am new to Django. i have been trying to install  downloaded (pack)"easy install" for days now without any result. i try all the methods from video tutorials, but nothing still. Can any one help me with the "easy install" scripts, so i c

Re: Django field model for HTML parser?

2017-12-13 Thread Mike Dewhirst
On 14/12/2017 4:00 PM, drone4four wrote: Hi fellow Djangoistas: I'm back. Thank you Atonis for your help.  I suppose I can leave the WYSIWYG editor static files for later when I have alittle more experience.  For now though: how can I enable HTML markup to parse like it should?  The box wher

Re: Help with Django Models

2017-12-13 Thread Mike Dewhirst
with specific names so the command can be executed like python manage.py fetch_web_values https://docs.djangoproject.com/en/2.0/howto/custom-management-commands/ Cheers Mike On Dec 13, 2017 19:12, "Mike Dewhirst" <mailto:mi...@dewhirst.com.au>> wrote: On 14/12

Re: Help with Django Models

2017-12-13 Thread Mike Dewhirst
On 14/12/2017 3:15 AM, Udit Vashisht wrote: I have an outside python function which reads a csv from web and fetch certain data in forms of tuple. So that i can use that tuple in my python models for choices in one of the fields. Till now i am running the function independently and copying the

Re: [OT] Is Trump planning to break the Internet?

2017-12-12 Thread Mike Morris
May I suggest: http://www.politicalforum.com/index.php Would *insist* help??? On 12/12/2017 05:14 AM, mccc wrote: I agree with Matthew's sentiment; also, I'd like to point out that the words you (Larry) posted are not your own but are literally coming off of foxnews.com

Re: Unable to setup Django

2017-12-08 Thread Mike Dewhirst
Power shell is unnecessary. I'm not sure but I think it gives you privileges you don't want while developing. Anyway, find where activate.bat is and cd to the dir above the Scripts dir and enter ... $>scripts\activate And cross your fingers :) Connected by Motorola Nav Pat wrote: >So Im t

[Solved] Off-topic - venv problem in Windows 8.1

2017-12-05 Thread Mike Dewhirst
On 6/12/2017 10:03 AM, Mike Dewhirst wrote: On 6/12/2017 12:04 AM, Jason wrote: How did you create the virtualenv in the first place? C:\Python36\python -m venv C:\Users\mike\envs\xxct3 I have completely re-venved and it is now working. I can't explain it. I always use a batch fi

Re: Off-topic - venv problem in Windows 8.1

2017-12-05 Thread Mike Dewhirst
On 6/12/2017 12:04 AM, Jason wrote: How did you create the virtualenv in the first place? C:\Python36\python -m venv C:\Users\mike\envs\xxct3 or C:\Python27\Scripts\virtualenv C:\Users\mike\envs\xxct -- You received this message because you are subscribed to the Google Groups "D

Off-topic - venv problem in Windows 8.1

2017-12-04 Thread Mike Dewhirst
I did a pip freeze in a virtualenv and saw packages I should not have seen. So I checked sys.path as follows ... C:\Users\mike\envs\xxct3\train>..\Scripts\activate (xxct3) C:\Users\mike\envs\xxct3\train>python Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit

Re: ldap server authentication

2017-12-02 Thread Mike Dewhirst
word offered to Django to log into to LDAP and check the LDAP groups then. Its a long time since I looked at it so things may not be as I remember them. Good luck Mike Thanks pacopyc -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Send email - user data for complete registration

2017-11-30 Thread Mike Morris
Earlier comment is correct that you shouldn't email a password. It's actually not necessary, or even possible. The stored version is a "one way hash" -- which is not reversible; there's no way to get the password from the hash -- and you (should) only have access to the hashed value. (Obviously

Re: case-insensitive username

2017-11-20 Thread Mike Dewhirst
On 20/11/2017 6:40 PM, Mike Dewhirst wrote: I have seen the two tickets and read the developer list thread[1]on this subject. Is there a best-practice approach to preventing usernames which are case-insensitively equivalent I'm hoping someone has achieved this and might be willing to

case-insensitive username

2017-11-19 Thread Mike Dewhirst
erits auth.models.AbstractUser unchanged and CommonUserCreationForm inherits auth.forms.UserCreationForm unchanged. Thanks Mike [1] #2273 and #25617 and https://groups.google.com/d/topic/django-developers/a4I7rHuT4Dw/discussion -- You received this message because you are subscribed to the Google Groups "Dja

Re: Problem with Django TemplateDoesNotExist.

2017-11-18 Thread Mike Dewhirst
On 19/11/2017 4:55 AM, jamesmarcusdavy7 wrote: Hello, am using django 1.11.7 with python 2.7.13.But i have a problem when trying to load my page,the page gives me this error TemplateDoesNotExist at / base.html Request Method: GET Request URL:http://127.0.0.1:8000/ Django Version

Re: reg:not able to open registration form web page

2017-11-17 Thread Mike Dewhirst
Amitesh I found this helpful ... https://simpleisbetterthancomplex.com/tutorial/2017/02/18/how-to-create-user-sign-up-view.html Cheers Mike On 17/11/2017 10:07 PM, 'Amitesh Sahay' via Django users wrote: Hello James, Thanks a lot for reply. There are couple of things that I woul

Re: Not Repaired django [Was: Repaired - Manager isn't available; 'auth.User' has been swapped for 'common.User']

2017-11-15 Thread Mike Dewhirst
Fixed it again. It works for me but no guarantees. Reverted previous changes and ... Insert line 23 - User = get_user_model() This needs someone above my pay grade. Cheers Mike On 16/11/2017 5:37 PM, Mike Dewhirst wrote: Seems to have pushed the error a bit further down the line. Still in

Not Repaired django [Was: Repaired - Manager isn't available; 'auth.User' has been swapped for 'common.User']

2017-11-15 Thread Mike Dewhirst
Seems to have pushed the error a bit further down the line. Still in trouble. Mike On 16/11/2017 5:31 PM, Mike Dewhirst wrote: The fix is to adjust 1.11 django.contrib.auth.forms as follows: Line 12 - comment it right out Line 88 - change User to UserModel Line 128 - change User to UserModel

Repaired django [Was: Manager isn't available; 'auth.User' has been swapped for 'common.User']

2017-11-15 Thread Mike Dewhirst
Form(forms.ModelForm): ) class Meta: -    model = User +    model = UserModel fields = '__all__' field_classes = {'username': UsernameField} Cheers Mike On 16/11/2017 3:18 PM, Mike Dewhirst wrote: Any hints appreciated. I'm stum

Manager isn't available; 'auth.User' has been swapped for 'common.User'

2017-11-15 Thread Mike Dewhirst
Any hints appreciated. I'm stumped. Traceback at the end. Many thanks Mike - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I have a custom user based on AbstractUser plus a UserProfile model as follows: #common.models

Re: Two forms in one template.

2017-11-15 Thread Mike Ru
Thank you so much! среда, 15 ноября 2017 г., 6:29:57 UTC+3 пользователь Mike Ru написал: > > How can I pass two forms(registration and login) in one template? I'm > using 'registration' and it's using different templates. For registration > it's using '

Re: Are time zone definitions actually required/used in MySQL?

2017-11-15 Thread Mike Dewhirst
On 16/11/2017 2:53 AM, bill.torcaso wrote: I frequently use Django + MySql on a pristine Vagrant virtual machine.  And on a fresh machine, for the first time, I had to manually load time zone information into mysql. 'runserver' refused to run, although 'python ./manage.py --help' ran fine (

Two forms in one template.

2017-11-14 Thread Mike Ru
How can I pass two forms(registration and login) in one template? I'm using 'registration' and it's using different templates. For registration it's using 'registration_form.html and for login it's using login.html. How can I pass a login form in modal window inside registration_form.html. In s

Re: DJANGO app loose path from batch file

2017-11-06 Thread Mike Morris
On 11/06/2017 10:12 AM, Xristos Xristoou wrote: i am windows user My condolences. -- 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...@go

Re: Django Simple Request

2017-10-26 Thread Mike Dewhirst
On 26/10/2017 3:08 AM, Ruifeng Hu wrote: Hi All, Is there anyone who can share with me some simples of Django, I just start learning Django! STart here ... https://docs.djangoproject.com/en/1.11/ Then here to see there are seven parts to the tutorial https://docs.djangoproject.com/en/1.11/

Re: DATA_UPLOAD_MAX_NUMBER_FIELDS exceeded when not conducting a mass event re ticket #26810

2017-10-12 Thread Mike Dewhirst
number of fields. There are lots of FKs etc. -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Mike Dewhirst Sent: Thursday, October 12, 2017 3:08 AM To: django-users@googlegroups.com Subject: DATA_UPLOAD_MAX_NUMBER_FIELDS

DATA_UPLOAD_MAX_NUMBER_FIELDS exceeded when not conducting a mass event re ticket #26810

2017-10-12 Thread Mike Dewhirst
he default 1000 fields. I haven't counted them though. Thanks for any elucidation Mike [1] Environment: Request Method: POST Request URL: http://localhost:8000/admin/substance/substance/80/change/ Django Version: 1.10.8 Python Version: 3.5.3 Installed Applications: [

Re: online training application

2017-09-28 Thread Mike Dewhirst
On 28/09/2017 10:38 PM, Joshua Hepburn wrote: Hi Mike, The immediate thought that comes to mind is moodle.org. I know it's not django or python - it's php. I only suggest it as I have worked for a number of years in IT for primary/secondary education institutions and I'm cu

online training application

2017-09-27 Thread Mike Dewhirst
olved. Obviously there will need to be a correct_answer model which the student never sees. Hope there is someone who has done it already. Thanks for any ideas Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Best option to check and/or convert encoding for csv files

2017-09-25 Thread Mike Dewhirst
On 26/09/2017 1:53 AM, Fellipe Henrique wrote: Thanks Mike, But my problem Ithink is more deep... I use pyexcel to try to open a CSV file, to work with that on my software... I receive these error everytime: 'utf-8' codec can't decode byte 0xa1 in position 14: invalid star

Re: Database scheme for a simple quiz app

2017-09-24 Thread Mike Dewhirst
On 25/09/2017 4:06 AM, Maitreya Verma wrote: I am trying to make a simple website where people can take quizzes (there can be multiple quizzes for any user) and their results ( as well as the option they chose) has to be stored. For that, I made a custom user class which will store details of a

Re: The Django admin documentation generator / Commands

2017-09-20 Thread Mike Dewhirst
t; is the wrong word. "enhancements" might be better. It doesn't need much work because it is already excellent. Cheers Mike Best, Simon Le mercredi 20 septembre 2017 19:10:42 UTC-4, Juan Francisco Mosquera a écrit : Does anybody know how add documentation to django custom comm

Re: collectstatic fails

2017-09-18 Thread Mike Dewhirst
This time with a plain text traceback. Sorry about that. On 19/09/2017 3:22 PM, Mike Dewhirst wrote: Ubuntu 16.04 dedicated staging server, Django 1.10.8, Python 2.7 Collectstatic has been working forever on this machine driven by Buildbot during a complete site deletion and recreation from

collectstatic fails

2017-09-18 Thread Mike Dewhirst
sion at PyConAu recently and decided never to use it (personally:) so it is maybe/possibly worthwhile uninstalling? Does anyone have any advice? Thanks Mike /usr/bin/python /var/www/ssds/manage.py collectstatic --settings=ssds.settings.staging --noinput Traceback (most recent call last): File

Re: Encapsulating Complex Business Logic in a Migraiton

2017-08-29 Thread Mike Dewhirst
On 30/08/2017 6:43 AM, Matt S wrote: Standard practice is that you do not refer to "current" models (i.e. from app.models import MyModel) in a migration as the migration will break when that models changes. This means copying any model-specific code into the migration. This becomes impractical

Re: Polls tutorial suggested mysite/mysite/urls.py improvement

2017-08-27 Thread Mike Dewhirst
On 27/08/2017 12:45 AM, Derek wrote: Mike Not sure what your github skill level is; Long ago I once set up  a github repo but lost my certificate when my laptop died and there it ended. I manage a number of subversion repositories for a number of people and all my dev is based on svn so I

Polls tutorial suggested mysite/mysite/urls.py improvement

2017-08-26 Thread Mike Dewhirst
ffect that the inner mysite/urls.py file will be instrumental in the "hello world" step later in the tutorial. Cheers Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Django Upsert Transaction

2017-08-25 Thread Mike Morris
what's the point of doing this I assume it is "atomicity" -- making sure the update/insert pair is indivisible and that it is impossible to do one without the other. Depending on application, that could be catastrophic... On 08/25/2017 04:39 AM, Fendy Purnomo wrote: Hi, I'm relativ

Re: Cannot access imported functions in django shell by pipeline command

2017-08-25 Thread Mike Morris
Wild guess: Different default directory. Try setting PYTHONPATH, or add "os.chdir('some/dir')" to top of script... On 08/24/2017 10:33 PM, Cheng-Hung Hsueh wrote: It is a python script `|tshi3.py|` : | 在此輸入代碼... |importcsv defli2ho2():print(csv)li2ho2()| | I copied this code and past

Re: include template in a page

2017-08-25 Thread Mike Morris
I may be alone in this, but perhaps it will help piceofkayk2718 to know that I completely ignore his (?) posts because there is never any context On 08/23/2017 12:01 PM, pieceofkayk2...@gmail.com wrote: Do you have an action on your register form? Like -- You received this message beca

Re: Deploying Django Tutorials or Guides - mod_wsgi, Apache, Linux

2017-08-25 Thread Mike Gering
After a lot of trouble, I got my django apps running on an apache server in CentOS/cPanel. I documented the apache config file in the readme for the project . And the website is https://quotes.klezy.xyzhttps://quote.klezy.xyz > -- You received this me

Re: Re: Migration of auth.user to custom user

2017-08-09 Thread Mike Dewhirst
;t an underconfident wuss! On Friday, August 4, 2017 at 3:37:08 AM UTC-4, Mike Dewhirst wrote: I have read widely (including the docs) and been daunted by the notion of coverting auth.user into a custom user. I have data and wonder if there have been any recent recipes for doi

Re: How to Minify, obfuscate, and compress django code

2017-08-09 Thread Mike Dewhirst
Have a look in __py cache__ Connected by Motorola hin Account wrote: >Hi All, > >I am developing one products using the django framework.  I don't to share the >my source code with the client. I just want to share the obfuscated code with >client. Please tell me how to do the same in django? 

User to UserProfile access problem

2017-08-09 Thread Mike Dewhirst
l for users to edit their preferences. I would like to include a view which incorporates selected fields from both models as a single inline under Company in the Admin. Is that possible? Should I instead retrofit a custom user? Thanks Mike -- You received this message because you are subscrib

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-07 Thread Mike Dewhirst
so we run queries to display records based on licences which exist between users. I guess that is row-level "permissions". I investigated all the object-permissions apps with a view to implement one but our requirements would have needed complex code. Easier to do our own. Cheers Mike

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-07 Thread Mike Morris
I have no expertise in the field, but I've chosen not to let that stop me from making a suggestion :-) How about splitting the difference: 1. Assign & track permissions on the application side, then 2. Pass the permission level/parameters into a Stored Procedure in the database If the Store

Migration of auth.user to custom user

2017-08-04 Thread Mike Dewhirst
I have read widely (including the docs) and been daunted by the notion of coverting auth.user into a custom user. I have data and wonder if there have been any recent recipes for doing this? Thanks Mike -- You received this message because you are subscribed to the Google Groups "D

Re: DateField does not update the date provided by hand

2017-07-27 Thread Mike Dewhirst
On 27/07/2017 9:14 PM, pablochud wrote: Yeah, but I would like datepicker too. if I changed it to CharField I would loose datepicker True. Looks like you might have to dig into the javascript source for the widget and make your own datepicker which takes random user input and figures out what

Re: DateField does not update the date provided by hand

2017-07-27 Thread Mike Dewhirst
On 27/07/2017 6:41 PM, pablochud wrote: Hi, is it normal that DateField make me to pick a date from datepicker and do not let me update the field by hand? - when trying to set a date by hand it automatically changing to date selected on datepicker. How can I let User to choose date both way?

Re: How can I auto-fill a field in the model without showing a form field to the user?

2017-07-26 Thread Mike Dewhirst
ly 25, 2017 at 4:48:22 PM UTC-6, Mike Dewhirst wrote: On 26/07/2017 3:15 AM, Alexander Joseph wrote: > How did you learn all the methods that are available Django is very comprehensively documented and almost any question you can think up is only a google search away. Typically

Re: Adding code when pressing one of admin's save buttons

2017-07-25 Thread Mike Dewhirst
On 25/07/2017 9:29 PM, ron_w_add via Django users wrote: I am using Django’s admin interface to create new records. A record includes (amongst other fields) the date and time that a photo was taken. These fields will be filled into the database when either the ‘Save and add another’, ‘Save an

Re: How can I auto-fill a field in the model without showing a form field to the user?

2017-07-25 Thread Mike Dewhirst
On 26/07/2017 3:15 AM, Alexander Joseph wrote: How did you learn all the methods that are available Django is very comprehensively documented and almost any question you can think up is only a google search away. Typically a search will reveal a Django doc reference and StackOverflow answers.

Re: Find variables marked for translations

2017-07-20 Thread Mike Dewhirst
My plan (not commenced yet) is to use an on-line translation API. I just googled "on-line translation api" and see there are quite a few options. On 20/07/2017 9:38 PM, prabhakar shanmugam wrote: Hi all, I am translating a message which is a variable. The variable is dynamic text. It can be f

Re: Math filter

2017-07-19 Thread Mike Morris
On 07/19/2017 06:20 PM, Vijay Khemlani wrote: I'm guessing he's using the mathfilters package https://github.com/dbrgn/django-mathfilters Arggghhh... my ignorance is showing! I hope I included an "I'm new here" disclaimer in the original post!!! Anyway, never heard of it, I'll take a look!

Re: Math filter

2017-07-19 Thread Mike Morris
Of course, if they're integers you could implement the "mul" as a loop of "add"s... clumsy, but would work. On 07/19/2017 03:39 PM, Mike Morris wrote: I am a newbie, but I think the answer is that you can't do that in the template - instead, calculate the num

Re: Math filter

2017-07-19 Thread Mike Morris
I am a newbie, but I think the answer is that you can't do that in the template - instead, calculate the number in the view and pass it to the template in the context dictionary. I think it's a design philosophy of Django Template Language to not support this as it muddies the border between d

Re: Django beginner

2017-07-13 Thread Mike Dewhirst
On 14/07/2017 9:48 AM, Amir Pirmoradian wrote: Hey Guys, i'm a absolute beginner at Django. I started to learn django from https://www.djangoproject.com but it's too confusing. I know python completely. My question is:Should i know anything else except python to learn Django?because i don't un

Re: Django beginner

2017-07-13 Thread Mike Morris
Start with the Tutorial on the djangoproject.com website. Finish it. Then, some other sources I like: * https://tutorial.djangogirls.org/en/ * http://www.tangowithdjango.com/ Google "django tutorials", there are lots On 07/13/2017 04:48 PM, Amir Pirmoradian wrote: Hey Guys, i'm a abso

Admin formfield_for_foreignkey is defeating me

2017-07-12 Thread Mike Dewhirst
wide'), 'fields': ( 'regulation', # foreign key to Regulation 'detail', 'modified', ), } ), ) inlines = ((IndexRegulationInline),) ad

Re: Django Teachers-Subject-Classroom Question

2017-07-10 Thread Mike Morris
This is more a DB Q than a Django Q, but googling ""schema" course teacher student classroom" yields a useful first hit: https://dba.stackexchange.com/questions/22064/database-schema-design-for-school-system On 07/10/2017 06:05 PM, Cristian Torzsa wrote: Hello, I what is the best database de

Re: The best database for django

2017-07-10 Thread Mike Morris
PostgreSQL or Oracle is the most "robust" of supported DB. (Certainly an opinion, but I doubt its a very controversial one.) If you had Oracle, you'd probably be required to use it so I'm assuming you can choose... which means you want PostgreSQL (free and very, very nearly as good - better fo

Re: How to create a fixed-length binary field with a unique constraint?

2017-07-10 Thread Mike Morris
From your description (save a SHA-256 checksum), you do not need a binary field. Binaries are always of indeterminant length; they can hold photos, executables, sound files, etc. By definition, a SHA -256 is 256 bytes of ASCII. You probably want a CharField(length=256). On 07/10/2017 08:56

Re:

2017-06-26 Thread Mike Dewhirst
On 27/06/2017 10:00 AM, sum abiut wrote: Hi all, I have this function where i i use mssqlalchmy to to fetch data from a mssql database. I am fetching data from a column but what i am interested in, is just to get a data from last field/row on that column. is there are way to get that done fro

Websocket, an existing connection was forcibly closed by the remote host. django-channels

2017-06-25 Thread Mike Johnson Jr
So I'm getting the error as described in the title of this post. I'm following this tutorial: https://gearheart.io/blog/creating-a-chat-with-django-channels/ Here's the full traceback: In [1]: import websocket In [2]: ws = websocket.WebSocket() In [3]: ws.connect("ws://localhost:8000")--

Re: [OT] Has someone tweaked the mailing list defaults?

2017-06-22 Thread Mike Dewhirst
Thank you Karol. I need somewhere to report my muscle-memory is a bug ... M On 23/06/2017 3:19 AM, Karol Bujaček wrote: On 06/22/2017 03:15 PM, Mike Dewhirst wrote: It appears that this list no longer has a Reply to: django-users@googlegroups.com Why is it so? Thanks Mike Dear Mike

Has someone tweaked the mailing list defaults?

2017-06-22 Thread Mike Dewhirst
It appears that this list no longer has a Reply to: django-users@googlegroups.com Why is it so? Thanks Mike -- 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

Re: If you have multiple custom users - what should you set AUTH_USER_MODEL to?

2017-06-20 Thread Mike Dewhirst
On 20/06/2017 1:13 PM, Mike Dewhirst wrote: On 20/06/2017 2:22 AM, 'Victor Hooi' via Django users wrote: If you go down the user-profiles route - how would you handle managing each of those via the Django Admin? I use group permissions to reveal or hide models in the Admin main m

Re: If you have multiple custom users - what should you set AUTH_USER_MODEL to?

2017-06-19 Thread Mike Dewhirst
On 20/06/2017 2:22 AM, 'Victor Hooi' via Django users wrote: If you go down the user-profiles route - how would you handle managing each of those via the Django Admin? I use group permissions to reveal or hide models in the Admin main menu. I use admin, editor, author and for example authors

<    2   3   4   5   6   7   8   9   10   11   >