Re: NoReverseMatch at - Reverse with arguments '('',)' not found

2019-02-07 Thread Ivan Martić
Problem solved, I had a null value in the db so listing couldnt work..

On Monday, February 4, 2019 at 6:59:09 PM UTC+1, B.navya spoorthi Sweety 
wrote:
>
> hi all , 
> i just started with django. i am following this document
> https://docs.djangoproject.com/en/2.1/intro/tutorial01/ 
> here database used is sqlite. but i want to try out  django+mongodb
> what all changes i can made so that django uses mongodb database 
> where should i create database and use with django.
>
> i knew Regular Mongo Db operations 
>
> but not able to do from Django 
>
>
> thanks in advance.
> waiting for a reply
>
> On Mon, Feb 4, 2019 at 5:18 PM Ivan Martić  > wrote:
>
>> Hi all,
>>
>> I need help.
>> I keep getting this issue, NoReverseMatch at /
>> Reverse for 'productsgrouping-update' with arguments '('',)' not found. 1 
>> pattern(s) tried: ['update/(?P[0-9]+)/$']
>>
>> not sure what am doing wrong. Any time I put url tag {% url 
>> 'productsgrouping-update' lista.id%} in html i get the error.
>> Both url work as stand alone,* /index* and */index/update/1/* but when i 
>> put url tag all hell break loose.. I strugling for a week now. Thank you 
>> all in advance.
>>
>> **
>> from django.shortcuts import render, redirect
>> from django.http import HttpResponse
>> from .models import Material4, MaterialGroup
>> from django.db import connection
>> from .forms import ProductgroupinputForm, MaterialGroupForm
>> from django.conf import settings
>>
>> def productsView(request):
>> lista = MaterialGroup.objects.all() 
>> #text5 = MaterialGroup.objects.get(id=url_id)
>> #return redirect(reverse('productsgrouping_update', kwargs=('id':url_id)))
>> return render(request, "productsgroup.html", {"lista" : lista})
>>
>> def productsUpdateView(request, url_id):
>> text5 = MaterialGroup.objects.get(id=url_id)
>> form5 = ProductgroupinputForm(request.POST or None, instance=text5)
>>
>> context1 = {'text5': text5,'form5': form5}
>>
>> if form5.is_valid():
>> form5.save()
>> return render(request, 'productsgroup-update.html', context1)
>>
>> **
>> from django.urls import path
>> from . import views
>>
>> urlpatterns = [
>> path('', views.productsView, name='productsgrouping'),
>> path('update//', views.productsUpdateView, 
>> name='productsgrouping-update'),
>> ]
>>
>> **
>> from django.contrib import admin
>> from django.urls import path, include
>> from django.contrib.staticfiles.urls import staticfiles_urlpatterns
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> path('', include('product.urls')),
>> ]
>>
>>
>> **
>> from __future__ import unicode_literals
>> from django.db import models, connection
>> from django.utils import timezone
>> from datetime import date
>> from django.urls import reverse
>>
>> class Material4(models.Model):
>> id = models.IntegerField(db_column='ID', primary_key=True, 
>> blank=False, unique=True)
>> bukrs = models.CharField(db_column='BUKRS', max_length=3)
>> materialid = models.CharField(db_column='MaterialID', max_length=50)
>> maktx = models.CharField(db_column='MAKTX', max_length=150)
>> input_group = models.IntegerField(db_column='Input_group')
>>
>> class Meta:
>> managed = False
>> db_table = 'Material4'
>>
>> def __str__(self):
>> return '%s %s %s %s' % (self.id, self.materialid, self.maktx, 
>> self.input_group)
>>
>>
>> **
>> from django import forms
>> from .models import Material4, MaterialGroup
>>
>> class ProductgroupinputForm(forms.ModelForm):
>>
>> class Meta:
>> model = Material4
>> fields = ['materialid', 'input_group', 'id', 'input_group']
>>
>> class MaterialGroupForm(forms.ModelForm):
>>
>> class Meta:
>> model = MaterialGroup
>> fields = ['material_group', 'id']
>>
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/0f15b6d9-4dec-4ef9-b79a-643fc37a8781%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 

Password Policy Adherence. Cannot use the passwords used before

2019-02-07 Thread Simon A
Hello,

I'm trying to make my django app follow this policy, that the user cannot 
user his/her last 6 passwords that were already used before.

I tried using the django-password-policies library but I'm getting a lot of 
errors. I think it's not compatible anymore with the current version of 
django.

I was wondering if there is a way that I can implement this requirement 
from scratch so I can get the whole picture.

If you could, kindly share some references that I can use to start with 
this.Or at least point me to the topics that I need to look into.

Thank you,
Simon

-- 
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/9c76092f-401e-474a-a19f-da142cc71f17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: drf - change Foreign key to another field in a serializer using modelviewset

2019-02-07 Thread Okware Aldo
Hi,

I think you should consider creating a custom serializer, where you can
modify that field, though I would advise you create another or modify yo
return the json object of the organiser.

https://www.django-rest-framework.org/api-guide/fields/#serializermethodfield

On Thu, Feb 7, 2019 at 10:23 PM Ing.Daniel Bojorge 
wrote:

> Hi.
>
> You can customize the queryset.
>
>
> Dios L@s Bendiga
>
> Saludos,
>
>
>
> [image: --]
>
> daniel.bojorge
> [image: http://]about.me/daniel.bojorge
> 
>
>
> *Domina el ORM  Django* 
> *Curso Desarrollo Web con Python usando Django 2.1 Para Principiantes*
> 
> *WebService RestFul API con Python usando Django RestFrameWork*
> 
> *Fácil Replicación de Cualquier Base de Datos y/o Sistema Operativo*
> 
> *Programación en Capas (Web y Escritorio)* 
> Mi Blog 
> Nicaragua
>
> "Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
> enseñanzas, pidan lo que quieran y se les dará.
> (Juan 15:7 DHH)
> Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
> (Jeremías 17:7 RV2000)
>
>
>
> El jue., 7 feb. 2019 a las 12:18, cyril moreau ()
> escribió:
>
>> Hi,
>>
>> I have a ModelViewSet class as :
>> class EventAPIListCreate( viewsets.ModelViewSet):
>>  queryset = EventAPI.objects.all()
>>  serializer_class = EventAPISerializer
>>
>> and my serializer looks like :
>> class EventAPISerializer(serializers.ModelSerializer):
>>class Meta:
>> model = EventAPI
>>fields = '__all__'
>>
>> when I hit the rest api endpoint I have the following result :
>>
>> [
>> {
>> "id": 1,
>> "name": "Cumple",
>> "location": "calle le corbusier",
>> "description": "cest le cumple de cyril",
>> "date": "2019-02-05T01:01:00Z",
>> "participant": 5,
>> "created_at": "2019-02-05T20:43:01.630400Z",
>> *"organisator": 2*
>> },
>>
>> {
>> "id": 2,
>> "name": "' or 1=1;",
>> "location": "calle le corbusier",
>> "description": "cest le cumple de cyril",
>> "date": "2019-02-05T01:01:00Z",
>> "participant": 4,
>> "created_at": "2019-02-05T20:45:11.265705Z",
>> *"organisator": 2*
>> },..
>>
>>
>> In the result you can see that "organisator" is a number because it is a
>> foreign key.
>>
>> the organisator model is composed as :
>> ID,
>> FirstName,
>> Lastname,
>> Email
>>
>>
>> I would like to change the endpoint result to have :
>>
>> {
>> "id": 1,
>> "name": "Cumple",
>> "location": "calle le corbusier",
>> "description": "cest le cumple de cyril",
>> "date": "2019-02-05T01:01:00Z",
>> "participant": 5,
>> "created_at": "2019-02-05T20:43:01.630400Z",
>> *"organisator": "myem...@gmail.com "*
>> },
>>
>>
>> or
>>
>> {
>> "id": 1,
>> "name": "Cumple",
>> "location": "calle le corbusier",
>> "description": "cest le cumple de cyril",
>> "date": "2019-02-05T01:01:00Z",
>> "participant": 5,
>> "created_at": "2019-02-05T20:43:01.630400Z",
>> *"organisator": "Firstname Lastname"*
>> },
>>
>>
>>
>> How can I do that?
>> Can i use customize the serializer or the modelviewset somehow?
>> should i use an APIView class instead of a modelviewset to be able to get
>> this result?
>>
>> I would like to keep the modelviewset as i find it very useful, but maybe
>> it is not posible
>>
>> Thank you
>>
>> --
>> 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/bc44ca0c-442b-4067-92e0-df9dadc28a47%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CAMQeQjawBsed98R1gNQkXNV9BbRNVHqbgZQ03%2B6t7kf-UTy_qg%40mail.gmail.com
> 

Re: DJANGO QUORA LIKE APPLICATION

2019-02-07 Thread Ben Indangasy
yes

On Thu, Feb 7, 2019 at 10:03 AM Peter Mudoko  wrote:

> I want a Django quora like application anybody who can do it hungout me
>
>
>
> Systems developer
>
> *Web Technologies Ltd*
>
> Email *p e...@webtechnologies.co.tz
> *
>
> Mobile: *+254 7 <%2B254%20729490486>21449067/+255716282017/+254721491491*
>
> *Website **http://www.w
> ebtechnologies.co.tz
> *
>
> *Skype:peter.mudoko15*
>
>
> *"Try and Try Again but dont fail to Try"*
>
> --
> 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/CABfSCxdH51a1%2BF%2BRtRKK7AmidtWo37yiaLKeYWneWPe_XHKx%2BQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAKHEhDLJdffotM_kO5cVNRrpVFnr20wkm-%2B3nNysTYmW3KPruw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: drf - change Foreign key to another field in a serializer using modelviewset

2019-02-07 Thread Ing.Daniel Bojorge
Hi.

You can customize the queryset.


Dios L@s Bendiga

Saludos,



[image: --]

daniel.bojorge
[image: http://]about.me/daniel.bojorge



*Domina el ORM  Django* 
*Curso Desarrollo Web con Python usando Django 2.1 Para Principiantes*

*WebService RestFul API con Python usando Django RestFrameWork*

*Fácil Replicación de Cualquier Base de Datos y/o Sistema Operativo*

*Programación en Capas (Web y Escritorio)* 
Mi Blog 
Nicaragua

"Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
enseñanzas, pidan lo que quieran y se les dará.
(Juan 15:7 DHH)
Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
(Jeremías 17:7 RV2000)



El jue., 7 feb. 2019 a las 12:18, cyril moreau ()
escribió:

> Hi,
>
> I have a ModelViewSet class as :
> class EventAPIListCreate( viewsets.ModelViewSet):
>  queryset = EventAPI.objects.all()
>  serializer_class = EventAPISerializer
>
> and my serializer looks like :
> class EventAPISerializer(serializers.ModelSerializer):
>class Meta:
> model = EventAPI
>fields = '__all__'
>
> when I hit the rest api endpoint I have the following result :
>
> [
> {
> "id": 1,
> "name": "Cumple",
> "location": "calle le corbusier",
> "description": "cest le cumple de cyril",
> "date": "2019-02-05T01:01:00Z",
> "participant": 5,
> "created_at": "2019-02-05T20:43:01.630400Z",
> *"organisator": 2*
> },
>
> {
> "id": 2,
> "name": "' or 1=1;",
> "location": "calle le corbusier",
> "description": "cest le cumple de cyril",
> "date": "2019-02-05T01:01:00Z",
> "participant": 4,
> "created_at": "2019-02-05T20:45:11.265705Z",
> *"organisator": 2*
> },..
>
>
> In the result you can see that "organisator" is a number because it is a
> foreign key.
>
> the organisator model is composed as :
> ID,
> FirstName,
> Lastname,
> Email
>
>
> I would like to change the endpoint result to have :
>
> {
> "id": 1,
> "name": "Cumple",
> "location": "calle le corbusier",
> "description": "cest le cumple de cyril",
> "date": "2019-02-05T01:01:00Z",
> "participant": 5,
> "created_at": "2019-02-05T20:43:01.630400Z",
> *"organisator": "myem...@gmail.com "*
> },
>
>
> or
>
> {
> "id": 1,
> "name": "Cumple",
> "location": "calle le corbusier",
> "description": "cest le cumple de cyril",
> "date": "2019-02-05T01:01:00Z",
> "participant": 5,
> "created_at": "2019-02-05T20:43:01.630400Z",
> *"organisator": "Firstname Lastname"*
> },
>
>
>
> How can I do that?
> Can i use customize the serializer or the modelviewset somehow?
> should i use an APIView class instead of a modelviewset to be able to get
> this result?
>
> I would like to keep the modelviewset as i find it very useful, but maybe
> it is not posible
>
> Thank you
>
> --
> 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/bc44ca0c-442b-4067-92e0-df9dadc28a47%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAMQeQjawBsed98R1gNQkXNV9BbRNVHqbgZQ03%2B6t7kf-UTy_qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


drf - change Foreign key to another field in a serializer using modelviewset

2019-02-07 Thread cyril moreau
Hi,

I have a ModelViewSet class as :
class EventAPIListCreate( viewsets.ModelViewSet):
 queryset = EventAPI.objects.all()
 serializer_class = EventAPISerializer

and my serializer looks like :
class EventAPISerializer(serializers.ModelSerializer):
   class Meta:
model = EventAPI
   fields = '__all__'

when I hit the rest api endpoint I have the following result : 

[
{
"id": 1,
"name": "Cumple",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 5,
"created_at": "2019-02-05T20:43:01.630400Z",
*"organisator": 2*
},

{
"id": 2,
"name": "' or 1=1;",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 4,
"created_at": "2019-02-05T20:45:11.265705Z",
*"organisator": 2*
},..


In the result you can see that "organisator" is a number because it is a 
foreign key.

the organisator model is composed as :
ID,
FirstName,
Lastname,
Email


I would like to change the endpoint result to have :

{
"id": 1,
"name": "Cumple",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 5,
"created_at": "2019-02-05T20:43:01.630400Z",
*"organisator": "myem...@gmail.com"*
},


or 

{
"id": 1,
"name": "Cumple",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 5,
"created_at": "2019-02-05T20:43:01.630400Z",
*"organisator": "Firstname Lastname"*
},



How can I do that?
Can i use customize the serializer or the modelviewset somehow?
should i use an APIView class instead of a modelviewset to be able to get 
this result?

I would like to keep the modelviewset as i find it very useful, but maybe 
it is not posible

Thank you

-- 
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/bc44ca0c-442b-4067-92e0-df9dadc28a47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: REST Framework alternatives

2019-02-07 Thread Ing.Daniel Bojorge
Hi everyone.

Tastypie is a good alternative, but it is too old, just look this date in
it's website (http://tastypieapi.org/)

[image: imagen.png]

and the requirements (https://django-tastypie.readthedocs.io/en/latest/)
[image: imagen.png]


I want to know, what kind of validation do you want to do?



Dios L@s Bendiga

Saludos,



[image: --]

daniel.bojorge
[image: http://]about.me/daniel.bojorge

 *Curso Desarrollo Web con Python usando Django 2.1 Para Principiantes*

*WebService RestFul API con Python usando Django RestFrameWork*

*Fácil Replicación de Cualquier Base de Datos y/o Sistema Operativo*

*Programación en Capas (Web y Escritorio)* 
Mi Blog 
Nicaragua

"Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
enseñanzas, pidan lo que quieran y se les dará.
(Juan 15:7 DHH)
Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
(Jeremías 17:7 RV2000)



El jue., 7 feb. 2019 a las 2:03, Derek () escribió:

> I can't speak to the inflexible, but there are a ton of tutorials out
> there for DRF, and I was able to make a lot of progress in just one weekend.
>
> I would think that JSON validation is an orthogonal problem; you can look
> at using something like https://pypi.org/project/jsonschema/ for this.
>
> On Tuesday, 5 February 2019 18:51:43 UTC+2, Victor Porton wrote:
>>
>> My buddy says that REST Framework is complex and inflexible.
>>
>> So the question: Any other framework which supports validating JSON data?
>>
> --
> 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/96288f60-354b-4b8f-85b9-945ea64347e0%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAMQeQja1-6fKALWRp5%2BAMY2ndJLXrvJ5bCxiPwmWekeNXcKc-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Connection framework ..Mobile App in Java to Python server on raspberry pi

2019-02-07 Thread Arush Gupta
Hi ,

I am trying to connect my mobile app similar to Google home app..to the
Python server running on Raspberry pi..

Django REST API framework an option ..any other suggestion..

My data is mostly runtime generated like current time, news etc.. not much
stored in database..

Suggestion appreciate d

Regards,

-- 
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/CAAjpTPAu1nBgTOu0R9kk4AVvMeSNUTvMi8ucWsq-5nOKDujkHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of asyncio

2019-02-07 Thread nm
If you're specifically looking for Django-related uses of asyncio, there's 
Channels  for websockets (and 
other stuff). You can find an example application - a simple chat - in the 
tutorial in the documentation.

W dniu sobota, 2 lutego 2019 03:39:57 UTC+1 użytkownik kannamshivakumar417 
napisał:
>
> Can anyone explain to which applications asyncio used for.
>

-- 
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/8a47b75b-eac0-49fd-ab16-37479001c404%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Webinterface for python script

2019-02-07 Thread PASCUAL Eric
Hi Scott,

100% agree with all your points about stock Django. This is BTW the way I use 
it in all my projects. The stripping experiment I mentioned has been done for 
curiosity's sake, for diving a bit into customization if ever I would need it 
some day.

Knowing this, my suggestion about providing indications about how to shrink 
Djagon's footprint is more aimed at reassuring people having doubts about 
Django being suited to their project because looking as "too heavy", by showing 
them that it can be slimmed down if wanted (needed ?).

Best

Eric


From: django-users@googlegroups.com  on behalf 
of Scot Hacker 
Sent: Thursday, February 7, 2019 09:16
To: Django users
Subject: Re: Webinterface for python script



On Wednesday, February 6, 2019 at 1:27:18 AM UTC-8, Eric Pascual wrote:
Hi Derek,
but I have never seen anyone refer to it as a "lightweight" project (before 
you, that is).
I didn't meant "Django is lightweight" but "Django can be lightweight", implied 
you configure it accordingly.

To be clear, I'm talking about stock Django. Out of the box, Django is already 
lightweight for all practical intents and purposes. I've *never* encountered a 
problem with startup time, memory usage, or speed due to Django itself. I don't 
need to remove the ORM or tweak the template layer or anything else. Out of the 
box, Django is already fast. Therefore, I cannot seem to find a use case that 
makes Flask worth all of the additional dev time that it requires worth it.


> What really matters is : "will the job be done ?".


Yep. And quickly. In execution time, there is no metric I care about where 
"Flask wins" but in development time, stock Django is way ahead of Flask.

I agree that what could be added in Django documentation is a section 
explaining how to strip its default application setting down to the minimal 
stuff for equating solutions such as Flask,

No need. Django doesn't need to be stripped down - it's already plenty fast for 
virtually every web project. Even the smallest ones. But as small projects grow 
into large/complex ones, Django has your back while Flask does not.

./s


--
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/8652bc68-3857-4d91-a3ba-8868ec63f636%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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/AM0P193MB0308C98AABD248C00D13BFBF8C680%40AM0P193MB0308.EURP193.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Re: Webinterface for python script

2019-02-07 Thread Scot Hacker


On Wednesday, February 6, 2019 at 1:27:18 AM UTC-8, Eric Pascual wrote:
>
> Hi Derek,
>
> but I have never seen anyone refer to it as a "lightweight" project 
> (before you, that is).
>
> I didn't meant "Django *is* lightweight" but "Django *can be* 
> lightweight", implied you configure it accordingly.
>

To be clear, I'm talking about stock Django. Out of the box, Django is 
already lightweight for all practical intents and purposes. I've *never* 
encountered a problem with startup time, memory usage, or speed due to 
Django itself. I don't need to remove the ORM or tweak the template layer 
or anything else. Out of the box, Django is already fast. Therefore, I 
cannot seem to find a use case that makes Flask worth all of the additional 
dev time that it requires worth it. 


> What really matters is : "will the job be done ?". 


Yep. And quickly. In execution time, there is no metric I care about where 
"Flask wins" but in development time, stock Django is way ahead of Flask.

>
> I agree that what could be added in Django documentation is a section 
> explaining how to strip its default application setting down to the minimal 
> stuff for equating solutions such as Flask,
>

No need. Django doesn't need to be stripped down - it's already plenty fast 
for virtually every web project. Even the smallest ones. But as small 
projects grow into large/complex ones, Django has your back while Flask 
does not. 

./s
 

-- 
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/8652bc68-3857-4d91-a3ba-8868ec63f636%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: REST Framework alternatives

2019-02-07 Thread Derek
I can't speak to the inflexible, but there are a ton of tutorials out there 
for DRF, and I was able to make a lot of progress in just one weekend.

I would think that JSON validation is an orthogonal problem; you can look 
at using something like https://pypi.org/project/jsonschema/ for this.

On Tuesday, 5 February 2019 18:51:43 UTC+2, Victor Porton wrote:
>
> My buddy says that REST Framework is complex and inflexible.
>
> So the question: Any other framework which supports validating JSON data? 
>

-- 
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/96288f60-354b-4b8f-85b9-945ea64347e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.