Isomorphic programming in Python & Django research

2018-07-14 Thread Jamesie Pic
Hi all,

this is a copy from our chat that may interrest this mailing list.

I came in here to announce our ReactJS implementation in Python :
https://blog.yourlabs.org/post/175884575803/tbinetruychip

so yeah, @tbinetruy, ReactJS dev with some python experience, is porting
react to python, and said "this kills reactjs", but was very tired ^^

this is what made him say that:
https://github.com/tbinetruy/CHIP/blob/master/chp/chip.py#L66-L69 :

content = [
def_local('x', 'document.getElementById(\'myInput\').value'),
chip_js.log('x'),
assign('document.getElementById(\'demo\').innerHTML', op('+', "'You
selected: '", 'x')),
]

Above, see he's programming JS from Python

We've been pair-programing this in hackaton mode since a few days
the only last thing is replacing that piece of code i pasted above, but a
python function, and use a python 2 js converter


Thus acheiving, isomorphic programing from Python, just like we can in go
(see: https://go.isomorphicgo.org/ )

We're always looking for new friends to participate in open research in our
crazy company. If you're interrested in changing how we Python hackers
relate to client side programming please let me know and we'll hook you up
in our hackaton.

Also note, if you're a known python / django contributor and have an
immediate need for money, we will sponsor some open source contributions in
advance. That might be something that can pay your trip to Djangocon or
something ;)

Have a beautiful day ;)

-- 
∞

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1_AiyphGnJ4Ztiw2PWvS%3Dmy_ZixqhWPGuuwv4zgTpCbFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Djangonauts: say no to selenium drug

2018-03-04 Thread Jamesie Pic
Hello everybody,

This is a message coming from the deepest of my heart.

When you start applying best development practices such as TDD, you
discover that you make much better software.

First, you can TDD your python code with anything, django has a test
runner, otherwise you have pytest and many friends.

Then, you make python to interact with javascript. In the Django community,
it seems that there is a conscensus around “use selenium to test your JS”.
I’ve been like this myself for years, but the thing with selenium is that
it’s functional testing, not unit testing, it does bring short term ROI,
but on the long term it becomes costy to maintain over time.

And lets face it: have 100% unit test coverage of your code first, then
think of functional testing. If you’re doing functional testing on some JS
code which has 0 unit test: you’re clearly wasting a lot of efforts on the
long run. Selenium is always going to ask for more attention, unit tests
are fast and have low resource requirements which make them perfect to run
on free services such as travis or circle.

The reality seems to be that most backend developers who are able to
produce quality backend code have hard times creating quality JS code. I
see this all the time:

   - django-dynamic-fields, until the current rewrite
   

   ,
   - django-autocomplete-light,
   - it’s the case for django-material js,
   - same for nagare framework js

And i’m not here to criticize django-material or nagare, i LOVE both, but
let’s be honest: our JS is not up to our Python in terms of quality.

To be completely honest, i’m writing this for me because I’m guilty as
everyone else, because i’m never falling in the trap again from now on. I
don’t see any excuse to not TDD JS and rely on functional tests instead,
it’s my fault and all I can honestly do about it is become a proper JS
developer, and apply the same design principles which help me make better
Python code.

Django itself, is even historically affraid of supporting any kind of JS
integration outside their famous admin app. So your Django app out of the
box will be usable as something from the Web 1.0 era. And really, I LOVE
Django, but I’m also honest about it.

This is my invitation to break the pattern: say no to selenium code. Please
TDD your JS code and release it as an NPM module, nowadays JS has all the
ecosystem like Python with package managers, unit testing libraries -
sometimes even better than Python.

And please, do go ahead and dump Python objects into JSON to pilot your JS
code, it’s easy to unit test on both sides, instead of wasting your time
with selenium.

With LOVE
https://blog.yourlabs.org/post/171520206623/djangonauts-say-no-to-selenium-drug

-- 
∞

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op19fepfsiamoCv7PAShxe%3D8bVpLSfCX1-CtsvhQjH5yfcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-09-22 Thread Jamesie Pic
Because Django is so awesome, I'm glad to show off the little framework
built upon Django only 4 days of coding later (but after thinking about it
for years and being asked by a customer - coming from modern PHP frameworks
ecosystem - to implement such a thing in their project).

https://www.youtube.com/watch?v=lGqeXp6zeo8

So, it's not a fork, just a smart pattern and modern default views and
templates out of the box.

Please feel free to digress or message me in private if you prefer.

Njoy B)
With <3

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1-zBpDm2q7CqLD55DBYfcNcA2HEWEb0wLFA81QMOerkZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-09-18 Thread Jamesie Pic
Hi all,

After taking a ride in Go lang framework world, and coming back with
the idea that I'd still be producing Django projects for the next 3
years, I have started to fix the problems I think are in Django in a
layer that sits on top of it: https://github.com/yourlabs/crudlfap
because I think that in 2017, my framework should let me configure
OOAO things like: permissions on models/fields/objects/views (not in a
table, please), ajax filtered configurable tables, autocompletes,
modern OOTB UI/UX, automatically create new databases and execute
migrations and ask me to create a superuser when I run runserver
(please), and other stuff I won't mention here because this is long
enough. For this reason, I am not longer interested in participating
to a fork.

Best
Jamesie
<3

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1_%3DfxmrfNjzSdsX%3DnNKz1-17jrk%2Bt-AB70Bih%3D%2BHo_NQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Ory editor integration

2017-05-25 Thread Jamesie Pic
Hi all,

I found this new WYSIWYG promising:

https://github.com/ory/editor

Anybody already working on integration of ORY editor with Django ?

Thanks !

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/81fc9809-16a9-4c0d-a3c7-fe359a957c2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-20 Thread Jamesie Pic
Thank you my friend !

Best
Jamesie
<3

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1_anJ%2BYDu8oSiRXF%3DO_nm7BojgfLhHhHYTmNiXkKA1v5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-20 Thread Jamesie Pic
Hi all,

Those of you who use some of my apps know that I don't put inline
javascript code ever in fields, for the reason that it's known to slow
page rendering. Also, it isn't known to help maintainability nor
re-usability. That Django provides this as the only way does not
invalidates that.

Also, overriding default form fields (and of course, classes) all the
time just because I want something that's /usable/, is not acceptable
in my logic. If I have to override something it should be to "add
value", not "make it usable". I'm sorry but it looks like you don't
understand me so I try to repeat myself but it might not work either
:D

I already know how to customize Django forms, as stated earlier, I'm
the author of django-autocomplete-light and have maintained and
supported it for the past 5 years for the community for free, for
sports. My requirement is: I want form fields to be usable out of the
box, without having to override the form class everywhere in the world
(admin, drf, django-filters, and so on) just because I want usable
fields.

Thanks a heap for sharing some of your insight

Best
Jamesie
<3

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1_AszLdo4p%2BqVnBtkYAXO3_JYfec8SHROHo03Xp4hNkkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Jamesie Pic
Thanks for the heads up Óscar, really cool app !

Upstream contribution is best yes, but not always possible in Django core.

For example in this case, we need to prove that an implementation is
working before contributing it upstream.

To prove that it works, we need to deploy it and live with it for a
while... hence my question is there any fork maintained by people who
would actually value this research ?

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op18pWaXf-wGV003rY_%2BKg0JQxFwMCd554VozJPLTZXfxAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Jamesie Pic
The admin's fine of course, because it has javascript.

But then when using django-filter in django-rest-framework or anything
else that relies on django defaults then the party is over and the
fight for usability begins again.

I feel that in a majority of the cases, it's not for something I want,
but for something that's just usable.

In these cases, I am frustrated because this blocks me from moving on
to building something I want.

It doesn't make sense *for me*, to have to override all form classes
in the world, to replace something that's not usable by something
that's usable.

If I'm overloading something, it should be to "add value", not to
"make it usable", in my personal, own opinion.

My point is indeed not necessarily to bake new fields in the core. We
should be able to share as much as possible with upstream Django ! But
at least I need hooks in Django code to be able to override the
defaults form fields.

And everything I proposed on django-dev since the fall of DAL v2 had a
defect or another that just prevented it from going forward.

I'm not saying they should have accepted my proposals, I'm just saying
that I want to be able to iterate on something, whatever that is. And
it has to be done outside of Django, based on my understanding of
Django processes. It has to be accepted first, before it can be
deployed. But I need to deploy something and iterate, before I can
convince that it is acceptable :P

About jquery autocomplete light there is a PoC to use JAL on DAL
rather than select2:
https://github.com/yourlabs/django-autocomplete-light/pull/749

I prefer JAL to select2 myself, because of the server side rendering
and simplicity... But we'll have to stick with select2 until we find
money to continue cover JAL with unit tests.

Best,
Jamesie
<3

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1878DfGxN2_D3m1NCf8zR%3DU%2BY83gGuuW--5ENRz3XqrBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Jamesie Pic
Nice to meet you Matthew <3 That's really funny, because the reason
I'm currently in this is because I'm trying to honor a promise I made
to the community (and myself tbh ^^) when I abandoned v2 in favor of
v3.

v2 has really sound features, "just make an autocomplete for this
model by default", helped a lot.

But, the code that did that was too much work because it was a lot of
working around Django internals. Do you have any idea, the effort it
was, to maintain this at all ?

https://github.com/yourlabs/django-autocomplete-light/blob/v2/autocomplete_light/forms.py

Even then, you had to use a custom modelform, when it should just be a
default, I mean, are you **ever** going to want a select box to render
with a million options ? No, no, no a thousand times no, right ? ;)

About the feature you're missing in v3, it seems like one of the most
recent features that was contributed:

http://django-autocomplete-light.readthedocs.io/en/master/tutorial.html#autocompleting-based-on-a-list-of-strings

Is that what you're talking about ?

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op19jWZsJr2oHEDJ4HMPFUdjFKdcEpyMP2QXNmrRaqzmYYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Jamesie Pic
On Mon, Apr 17, 2017 at 5:47 PM, Vijay Khemlani  wrote:
> If you need particular form widgets or fields not readily available in
> Django I would prefer to write an app that includes them instead of forking
> the whole framework.

That's why I've been writing AND maintaining apps such as
django-autocomplete-light and like, a lot, lot, lot of others. But
still, it's always the same code in projects just to override an
unusable default form field with something that is usable, in my case.

You are free to not consider it a problem you want fixed, when Django
renders a ForeignKey form field as a select input with millions
options, or when user submits a form that doesn't validate and has to
re-upload a file, or when a user is fighting with a datetime input, or
with env-vars based settings.

Wouldn't it be easier to discuss about solutions, if we already had a
few forks out there that have been iterating on solutions for the last
years ?

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1-6Wzhru1iqPxXi8FQeFPjSgf2r8CJ5u2C%2B92ZAAuXiJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Jamesie Pic
Matthew, using another framework for new projects would be a tempting
solution, if I was not already maintaining god knows how many Django
apps and projects, and basically had not been capitalizing on Django
itself for the last decade.

Vijay, that RoR failed at it, fails to scare me out, and does not look
like a logic argument *for me*. I'm a lot more comfortable with
failing than with not trying. And even if it was really "impossible"
and that I fail to understand it, I'm not saying it would be better
for you anyway, I'm just looking for other people who think it would
serve them too, hence my initial questions, where are forks ?

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1_4skkvV0PVxAxjsShG%3DD5ryF6uYypwtL2v2UhN8ZGMSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Jamesie Pic
Dear Andréas,

During the past decade, I have fought that model fields do not have
usable form fields out of the box.

"Django doesn't want to couple a JS framework", is what I remember
from discussions. For me, having JS enabled form fields does not mean
**removing** support for pure-HTML form fields, so, nobody would be
actually "coupled with a JS framework". And, supporting one JS
framework doesn't mean Django couldn't support other framework
neither.

I'd like to try a Django fork that LOVES javascript and out of the box
experience. Currently, the philosophy in Django is "if it can be in an
app then it should be in an app", which opposes what "improving ootb
experience" means for me.

Also, I'd like it to make it easier for newbies to install Django
projects, I've posted about this in a thread about
DJANGO_SETTINGS_FILE on django-dev.

And of course, I'd like a fork that's easy to contribute to, iterate
with, so that features can mature outside of Django before being
proposed upstream. I'm up for helping others on their features too of
course ;)

Best,
Jamesie
<3

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC6Op1_TS58kQUnDv0_3vXtF%3DbnsUaqtOe7zq2f8kKe4XBsssw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.