Re: Activating VirtualEnv on Windows

2017-04-17 Thread Antonis Christofides
Apparently the documentation isn't very clear. Either the "source" is an error,
or the documentation assumes you are executing the command inside a Git Bash 
window.

Antonis Christofides
http://djangodeployment.com

On 2017-04-14 15:03, Lorenz Schümann wrote:
> Hey, newbie here.
> I've followed the instructions on
> https://docs.djangoproject.com/en/1.11/intro/contributing/ regarding
> Virtualenv. And at the point where it says for Windows, to activate the
> Virtualenv, type $ source ~/virtualenvs/djangodev/Scripts/activate, I found
> out through StackExchange that indeed it's just the activate.bat you need to
> run, as I don't have a source command in my Windows distro. Now isn't that the
> most straight forward way anyway and should replace the method, which is
> written down in the tutorial.
> -- 
> 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/99317c1e-01ac-49bf-9064-96acd4e3f690%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/7b3153d7-5d2f-51c9-2c26-2ead181d4e0d%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Andréas Kühne
Hi,

Just out of curiosity, what is the problem that you are having?

Regards,

Andréas

2017-04-16 15:27 GMT+02:00 :

> Hello everybody !
>
> Anybody maintaining a Django fork and open for contributions ?
>
> I want to fix problems that have been recurrent for me over the last
> decade, and that Django doesn't want to fix for ideological reasons.
>
> So, if I don't find a fork that's open for contributions I will make my
> own.
>
> TYIA
> 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/b45a3224-e8bc-481b-97a3-d8aa554b3dd2%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/CAK4qSCdqmjKM%2BQw5n5vVzy%3D3AhJn9RpyAYjnrDQ%2B4E-1h_wJHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-admin.py Error

2017-04-17 Thread Chris Bartos
This issue is something to do with your Python version. Uninstall Python 
and install Python 2.7.8 instead of 2.7.7 as it seems there are issues with 
it.

Chris

On Tuesday, May 26, 2015 at 1:06:07 AM UTC-5, Shashwat singh wrote:
>
> Django is properly installed but when i run, django-admin.py it returns 
> the following error.
>
> Traceback (most recent call last):
>   File "/usr/local/bin/django-admin.py", line 5, in 
> management.execute_from_command_line()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 338, in execute_from_command_line
> utility.execute()
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", 
> line 312, in execute
> django.setup()
>   File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 
> 15, in setup
> from django.utils.log import configure_logging
>   File "/usr/local/lib/python2.7/site-packages/django/utils/log.py", line 
> 16, in 
> from django.views.debug import ExceptionReporter, 
> get_exception_reporter_filter
>   File "/usr/local/lib/python2.7/site-packages/django/views/debug.py", 
> line 9, in 
> from django.core.urlresolvers import Resolver404, resolve
>   File 
> "/usr/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 
> 18, in 
> from django.http import Http404
>   File "/usr/local/lib/python2.7/site-packages/django/http/__init__.py", 
> line 2, in 
> from django.http.request import (HttpRequest, QueryDict,
>   File "/usr/local/lib/python2.7/site-packages/django/http/request.py", 
> line 12, in 
> from django.core import signing
>   File "/usr/local/lib/python2.7/site-packages/django/core/signing.py", 
> line 46, in 
> from django.utils.crypto import constant_time_compare, salted_hmac
>   File "/usr/local/lib/python2.7/site-packages/django/utils/crypto.py", 
> line 8, in 
> import hmac
>   File 
> "/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hmac.py",
>  
> line 8, in 
> from operator import _compare_digest as compare_digest
> ImportError: cannot import name _compare_digest
>
> And here is my python path - when i ran echo $PATH:
>
>
> /Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin
>
>
>
> Please help. 
>

-- 
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/ce6e2d8d-3fb1-4937-912d-53bce11864a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Data base connection problem

2017-04-17 Thread Chris Bartos
Few things you can do:


   1. Check to make sure your app is in INSTALLED_APPS
   2. Delete the migrations folder and run 'manage.py makemigrations' & 
   'manage.py migrate' again
   3. depending on the name of the app (let's say student) you can try 
   running 'manage.py makemigrations student' & 'manage.py migrate'

Chris

On Saturday, February 13, 2016 at 11:42:23 PM UTC-6, News Latest wrote:
>
> i have made a model  names STUDENT and when i run migrataion no migration 
> applied but when from admin i tried to browse student i got following error
>
> OperationalError at /admin/app/student/
>
> no such table: app_student
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/admin/app/student/
> Django Version: 1.9.2
> Exception Type: OperationalError
> Exception Value: 
>
> no such table: app_student
>
> Exception Location: C:\Users\nauman malik\Google 
> Drive\feedbacknew\feedbacknew\env\lib\site-packages\django\db\backends\sqlite3\base.py
>  
> in execute, line 323
> Python Executable: C:\Users\nauman malik\Google 
> Drive\feedbacknew\feedbacknew\env\Scripts\python.exe
> Python Version: 2.7.10
> Python Path: 
>
> ['C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew',
>  'C:\\Windows\\SYSTEM32\\python27.zip',
>  'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\DLLs',
>  'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\lib',
>  'C:\\Users\\nauman malik\\Google 
> Drive\\feedbacknew\\feedbacknew\\env\\lib\\plat-win',
>  'C:\\Users\\nauman malik\\Google 
> Drive\\feedbacknew\\feedbacknew\\env\\lib\\lib-tk',
>  'C:\\Users\\nauman malik\\Google 
> Drive\\feedbacknew\\feedbacknew\\env\\Scripts',
>  'C:\\Python27\\Lib',
>  'C:\\Python27\\DLLs',
>  'C:\\Python27\\Lib\\lib-tk',
>  'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env',
>  'C:\\Users\\nauman malik\\Google 
> Drive\\feedbacknew\\feedbacknew\\env\\lib\\site-packages']
>
>

-- 
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/a344e7e4-8ca4-4211-90ae-7b7a04922d41%40googlegroups.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.


RE: Django forks

2017-04-17 Thread Matthew Pava
Something you may want to consider is web2py.  It has a lot out of the box.
http://www.web2py.com/



-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Jamesie Pic
Sent: Monday, April 17, 2017 9:58 AM
To: django-users@googlegroups.com
Subject: Re: Django forks

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.

-- 
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/622fa051501f48bd9dc72865ca42c8d4%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Vijay Khemlani
Django is essentially a backend development framework (essentially receive
http request, make http response)

Ruby on Rails tried to integrate with a javascript "framework" in its time
(Prototype / Scriptaculous if I remember correctly) and it exploded on
their faces in my humble opinion.

On Mon, Apr 17, 2017 at 12:01 PM, Matthew Pava  wrote:

> Something you may want to consider is web2py.  It has a lot out of the box.
> http://www.web2py.com/
>
>
>
> -Original Message-
> From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]
> On Behalf Of Jamesie Pic
> Sent: Monday, April 17, 2017 9:58 AM
> To: django-users@googlegroups.com
> Subject: Re: Django forks
>
> 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.
>
> --
> 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/622fa051501f48bd9dc72865ca42c8d4%40ISS1.ISS.LOCAL.
> 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/CALn3ei2J8miNWupexEEADOq5uz0axSOiOZ%2BomWUxAmA3zXhjBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread m712 - Developer
You can always make an extension. Many popular things in the framework are 
contributions from the community including the current default authentication 
system. It doesn't have to be in a fork either.On Apr 17, 2017 5:57 PM, Jamesie 
Pic  wrote:
>
> 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. 

-- 
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/58f4db8c.8d2f1c0a.7f78c.c155SMTPIN_ADDED_MISSING%40gmr-mx.google.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: Creating multiple objects with one request in Django Rest Framework

2017-04-17 Thread Aamu Padi
Hi,

I couldn't find anything useful in that link that can help me solve my
problem. What am I missing?

On Mon, Apr 17, 2017 at 10:54 AM, m712 - Developer <
comeon@getbackinthe.kitchen> wrote:

> Hi,
> Take a look at https://docs.djangoproject.com/en/1.11/topics/db/
> examples/many_to_many/
> On Apr 17, 2017 8:19 AM, Aamu Padi  wrote:
>
> I am using Django as the backend server and Vue.js for the front end Movie
> app.
>
> I have a Ticket model
>
> class MovieTicket(models.Model):
> show = models.ForeignKey(Show)
> seat = models.ForeignKey(Seat)
> user = models.ForeignKey(User)
> purchased_at = models.DateTimeField(default=timezone.now)
> qrcode = models.ImageField(upload_to='qrcode', blank=True, null=True)
> qrcode_data = models.CharField(max_length=255, unique=True, blank=True)
>
> class Meta:
> unique_together = ('show', 'seat')
>
> And its related Serializer
>
> class MovieTicketSerializer(serializers.ModelSerializer):
> class Meta:
> model = MovieTicket
> fields = '__all__'
>
> To buy a new Ticket there's a view which is mapped to this url 
> *http://dev.site.com/api/movies/buy-ticket/
> :*
>
> @api_view(['POST'])@permission_classes([IsAuthenticated])def 
> buy_ticket(request):
> serialized = MovieTicketSerializer(data=request.data)
> if serialized.is_valid():
> serialized.save()
> return Response(serialized.data, status=status.HTTP_201_CREATED)
> return Response(serialized._errors, status=status.HTTP_400_BAD_REQUEST)
>
> Now from the front end (Vue.js) I can create a new movie ticket like this:
>
> const formBody = {
> show: this.$store.state.showSelected.showTime.id,
> user: this.$store.state.user.id,
>
> // selectedSeats is an array of seats that have been selected by the 
> user. Here I am passing the first seat object.
> seat: this.$store.state.selectedSeats[0].seat.id};
> this.$http.post("http://dev.site.com/api/movies/buy-ticket/";, formBody)
> .then(function (response) {
> console.log(response.data);
> })
> .catch(function (response) {
> console.log(response);
> });return;
>
> If the form was valid, this will create a new MovieTicket Object.
>
> Now, suppose if the user selected multiple seats, I can loop through each
> selectedSeats array and get the seat ids. But what I am confused is how
> can I pass multiple seat.id if Django rest framework is only accepting
> one seat per request?
>
> --
> 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/CAHSNPWv7yXiCM2VAHU3MBb19nLADU
> 49UH5ZONKW5C7YEUTtfmg%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/58f451a8.4d881c0a.8d9c5.038cSMTPIN_
> ADDED_MISSING%40gmr-mx.google.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/CAHSNPWuVqivpyV%2BqsKe8Ju_J5qZjCrmBSVVpGd%3Dw%3D7fxXQ1wLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: Django forks

2017-04-17 Thread Matthew Pava
Well, since web2py is in Python, you might find some inspiration there for any 
extensions or improvements to Django that you would like to see.  Why reinvent 
the wheel, you know?

-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Jamesie Pic
Sent: Monday, April 17, 2017 10:19 AM
To: django-users@googlegroups.com
Subject: Re: Django forks

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.

-- 
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/ab7afe0af29e4d57bcf6724aa81517ea%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: Django forks

2017-04-17 Thread Vijay Khemlani
I'm not trying to scare anyone

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.

On Mon, Apr 17, 2017 at 12:39 PM, Matthew Pava  wrote:

> Well, since web2py is in Python, you might find some inspiration there for
> any extensions or improvements to Django that you would like to see.  Why
> reinvent the wheel, you know?
>
> -Original Message-
> From: django-users@googlegroups.com [mailto:django-users@googlegroups.com]
> On Behalf Of Jamesie Pic
> Sent: Monday, April 17, 2017 10:19 AM
> To: django-users@googlegroups.com
> Subject: Re: Django forks
>
> 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.
>
> --
> 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/ab7afe0af29e4d57bcf6724aa81517ea%40ISS1.ISS.LOCAL.
> 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/CALn3ei2ToOVLabQLs50eMtNDimuBCofUjSG_htpoqBv_ixhd4w%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 Matthew Pava
You are the author of DAL?  Nice to meet you!  We use that!  We do use version 
2 of it, though.  We couldn't find a very important feature for us to upgrade 
to v3: a text autocomplete that is not based on a pk of a model.  Also, 
unfortunately, with the release of Django 1.11, the autocompletes from v2 do 
not render properly.  I haven't had time to look into it, though.



-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Jamesie Pic
Sent: Monday, April 17, 2017 11:06 AM
To: django-users@googlegroups.com
Subject: Re: Django forks

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.

-- 
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/ed54bcfe947f4c99b7eea03a7678f259%40ISS1.ISS.LOCAL.
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 Matthew Pava
Django 1.11 made a major change to widget rendering.  I am wondering if this 
would help you significantly in your quest.  The widget is rendered with a  
template.  It would seem you could include the JavaScript in that template.

But you are right; it is quite frustrating when I'm going to the admin page for 
a model with a foreign key, and it takes 2 minutes to render because it's 
rendering the string for 100,000 records to put in a select box.  Then I have 
to go back and change them to raw ID fields so that such attempts do not stop 
me from working efficiently.  Perhaps the Django team can reconsider that 
feature.

And, yes, that looks like the feature I was looking for.  I will try updating 
my project soon.  I do prefer the autocomplete light widget over the select2 
widget.



-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Jamesie Pic
Sent: Monday, April 17, 2017 11:26 AM
To: django-users@googlegroups.com
Subject: Re: Django forks

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.

-- 
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/7bb3740cdf9348d0a29cfc493f3dc2cf%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Re: safe perfect and reliable app for verification email

2017-04-17 Thread ludovic coues
I believe we have a code of conduct against posting an answer which is
nothing more than a google link.

I don't know any app handling email verification. If I had to do it, I
would copy how django handle password reset. Send an email with with a
link containing a token. When someone hit that url, check if they are
connected and their account is associated with the token.

As far as I know, there are no way to know if an email is valid
without sending a message. There are various check we can do to mark
an email as invalid but these need constant update. An example could
be tld.

2017-04-16 15:07 GMT+02:00 Willian Will :
> Hey, you can user javasript for that, thus You dont need use ajax or
> anything for retrieve confirmation about email is correct or no , but you
> need confirm about the email already exists in database ?
>
>
> sábado, 15 de Abril de 2017 às 09:22:21 UTC-3, shahab emami escreveu:
>>
>> hello
>> I want to verify user's email while user is registering  .
>>
>> can you introduce me a few safe perfect  and reliable app for verification
>> email?
>>
>> 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/9e07bab1-2bdc-4056-9a6e-29a418f932d8%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Ludovic Coues
+33 6 14 87 43 42

-- 
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/CAEuG%2BTb6V%3DoUHB6XNz2UvbyH-U4pj94zSnocj8A9R%2B-nZxQELg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Raspbbery PI - PI3D - Apollo Soyuz 3d model to Freeboard dashboard node red

2017-04-17 Thread ludovic coues
You have a client side problem.
Django only handle server side.

2017-04-16 16:40 GMT+02:00 Elad Barshan :
> hello,
> i am in search for a solution to display real time PI3D model for
> pre-designed Apollo-Soyuz 3D model
> moving real time on 3 Axes according to Gyro installed on top of the RPI
> called Sense Hat
>  on a Freeboard Dashboard (powered by node red) widget
>
> as far i understand, the only way to it is transforming the this 3d python
> script to html data source
> so that the freeboard widget can display it
>
>
> can Django help in this task, how so
> do you have another solution for this
>
>
> thanks,
> elad
> 972-506-880102
> well...@gmail.com
>
> --
> 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/56e6aaf4-e82f-4dc6-8551-7f500f3374a3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Ludovic Coues
+33 6 14 87 43 42

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


Re: Django forks

2017-04-17 Thread Óscar M . Lage


On Mon, Apr 17, 2017 at 18:07:07 (UTC+2), Jamesie Pic escribió:
>
> 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[...]
>

I'm more or less in the same "mood", taking a look to other solutions 
(mostly cruds, admin generators etc...) working with other frameworks I 
think there is a big difference with Django right now. But instead of 
reinvent the wheel I thought it was better to contribute in any way (I 
assume you did the same with DAL and others) with a more friendly crud 
generator, extensible, with custom widgets and easy to add more widgets and 
kind of fields:

- Date, Time and DatetimePickerWidget 
- ColorPickerWidget
- Editor widget (ckeditor...)
- Select2
- Image cropping
- Forms with tabs and wrappers of fields (crispy-forms)
- Support for inlines + search...

FYI: https://github.com/oscarmlage/django-cruds-adminlte

My 2cents, 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/e09845e7-fd66-4dff-aeb6-7d2ea837fd6d%40googlegroups.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
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: how to use generic_inlineformset_factory ?

2017-04-17 Thread Angel Felipe González Garcia
Hi Marcos , how are you? i would like to know about Generic  Inline formset 
factory, i tried to acces to your dpaste code but it has expired, can you 
please provide other link or shar your explanation or code by this same 
way? regards

El lunes, 8 de diciembre de 2008, 3:51:09 (UTC-4), Marco Louro escribió:
>
> Well, i've spent countless hours on this, and it was so easy.. I guess 
> it could be added to the docs since It's a really nice feature. 
>
> I've posted my very bad view code at dpaste, but it might be enough if 
> anyone who has a similar problem 
> http://dpaste.com/hold/96937/ 
>
>
>
> On Dec 8, 4:28 am, Marco Louro  wrote: 
> > Thanks for quick reply Malcom. 
> > 
> > This is the code for my view. 
> > I know I'm missing something, the formsets do show up correctly on the 
> > form page, but I'm just not seeing how to load the request.POST data 
> > into the formset for validation and save 
> > 
> > The error I get is: 
> > Exception Value: 'Manager' object has no attribute 'empty' 
> > Exception Location: /usr/lib/python2.5/site-packages/django/contrib/ 
> > contenttypes/generic.py in get_queryset, line 310 
> > 
> > def add(request,contact_type): 
> > 
> > AddressFormSet = generic_inlineformset_factory(Address, extra=2) 
> > 
> > if request.method == 'POST': 
> > address_formset = AddressFormSet(request.POST,request.FILES) 
> > else: 
> > address_formset = AddressFormSet(instance=Person.objects.get 
> > (id=2)) 
> > 
> > I've also tried loading with 
> > address_formset = AddressFormSet(Person,BaseGenericInlineFormSet 
> > (request.POST,request.FILES)) 
> > 
> > Exception Value: 
> > 'NoneType' object has no attribute '_meta' 
> > Exception Location: /usr/lib/python2.5/site-packages/django/contrib/ 
> > contenttypes/generic.py in __init__, line 295 
> > 
> > On Dec 8, 4:07 am, Malcolm Tredinnick  
> > wrote: 
> > 
> > > On Sun, 2008-12-07 at 19:46 -0800, Marco Louro wrote: 
> > > > Hi, 
> > 
> > > > I'm trying to use generic_inlineformset_factory. There are no docs 
> for 
> > > > it except a Generic Relations Model example @ 
> > > >http://www.djangoproject.com/documentation/models/generic_relations/ 
> > > > on the bottom (GenericInlineFormSet tests) 
> > 
> > > > My question here is how to pass the POST vars to it? 
> > 
> > > > In a modelformset_factory the following works: 
> > > >  formset = AddressFormSet(request.POST, request.FILES) 
> > 
> > > > but here it is not the case.. 
> > 
> > > Can you be specific about what is not working? If you look at the 
> source 
> > > for GenericInlineFormset, it certainly takes those parameters as the 
> > > first two arguments. So what are you actually doing and what error are 
> > > you seeing? (trim your example down the smallest possible code that 
> > > shows the problem so we don't have to wade through dozens of lines.) 
> > 
> > > Regards, 
> > > Malcolm

-- 
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/e7c6084d-5f7d-4848-9c9d-4fd38ea9c387%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Does anyone in this group hire out to update code .

2017-04-17 Thread Web Design by Sami Social Media by Sami
I need a django programmer to make changes to an existing site.

-- 
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/9c4891d8-d548-408e-a73c-758cf584b76e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I am in need of a django programmer

2017-04-17 Thread Web Design by Sami Social Media by Sami
http://www.prosadata.com/slamgrams/Slamgrams1.html

my email is wdbs...@gmail.com

-- 
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/c397e9b2-868c-484e-b148-1c531892c4dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Automatic reverse migrations

2017-04-17 Thread paul
Thanks Andrew, will see what I can rustle up.

Camilo -- blue/green deploys don't really help with this problem. As each 
application deployment still talks to the same database, once you have run 
the migration you can't just abandon your deployment, you need to unwind 
the db migration first.

On Saturday, April 15, 2017 at 6:01:03 PM UTC-7, Camilo Torres wrote:
>
> Hi,
> May both of you try to implement "blue-green deployments", and switch only 
> if all tests are OK.
> You may also be interested in running a test deployment in a testing 
> environment prior to production.
> Don't know of a solution integrated into django.
>
> On Friday, April 14, 2017 at 2:26:51 PM UTC-4, Andrew Godwin wrote:
>>
>> Hi Paul,
>>
>> I have tried this in the past, but it's basically an unsolvable problem 
>> in the generic case. Databases do not take well to snapshotting or changing 
>> schema, and some operations are naturally irreversible. If you find a way 
>> that works well, I suggest you write it up so others can learn from it!
>>
>> Andrew
>>
>> On Fri, Apr 14, 2017 at 10:33 AM,  wrote:
>>
>>> In a modern Continuous Delivery environment, it's expected that there is 
>>> an automated process for deploying code, and therefore performing database 
>>> migrations. This is all straightforward.
>>>
>>> I haven't been able to find any good solutions for automatic rollback 
>>> though. The main problem that I see is that there is (AFAIK) no easy way to 
>>> definitively know which migrations to unapply to roll back to the previous 
>>> verison. If you try to rollback from the new N+1 version, you have the 
>>> migrations, but no recording of the previous version's state. If you 
>>> rollback from the previous N version, you don't have the new migration 
>>> files to do the DB rollback.
>>>
>>> What I'd really like is a way of recording a 'db migration checkpoint' 
>>> which could be generated per-release (or whenever else you care to 
>>> checkpoint your migration state), and would say something like `v1: 
>>> {app1:0002,0003, app2: 0004}, v2: {app1:0004, app2: 0005, 0006}`, thus 
>>> letting me roll back all of the migrations in the v2 deploy with a single 
>>> command.
>>>
>>> Does anyone have suggestions or references here? I may try rolling the 
>>> above solution if there is no prior art, but I want to avoid reinventing 
>>> the wheel here, as it seems that this issue must have been hit by many 
>>> other users before me.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@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/6cafecca-2c71-4a6f-b93b-fe3e64847bc2%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/8d8f46a7-8819-4d18-908d-9681d8b6a39e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Automatic reverse migrations

2017-04-17 Thread Mike Dewhirst

On 18/04/2017 9:58 AM, p...@qwil.co wrote:

Thanks Andrew, will see what I can rustle up.

Camilo -- blue/green deploys don't really help with this problem. As 
each application deployment still talks to the same database, once you 
have run the migration you can't just abandon your deployment, you 
need to unwind the db migration first.


I agree it is an unsolvable problem to automate it. Or rather, not worth 
the development cost of making an automatic "unwinder".


For the number of times it is likely to be needed in general it would be 
less costly to do another new migration towards the previous state.




On Saturday, April 15, 2017 at 6:01:03 PM UTC-7, Camilo Torres wrote:

Hi,
May both of you try to implement "blue-green deployments", and
switch only if all tests are OK.
You may also be interested in running a test deployment in a
testing environment prior to production.
Don't know of a solution integrated into django.

On Friday, April 14, 2017 at 2:26:51 PM UTC-4, Andrew Godwin wrote:

Hi Paul,

I have tried this in the past, but it's basically an
unsolvable problem in the generic case. Databases do not take
well to snapshotting or changing schema, and some operations
are naturally irreversible. If you find a way that works well,
I suggest you write it up so others can learn from it!

Andrew

On Fri, Apr 14, 2017 at 10:33 AM,  wrote:

In a modern Continuous Delivery environment, it's expected
that there is an automated process for deploying code, and
therefore performing database migrations. This is all
straightforward.

I haven't been able to find any good solutions for
automatic rollback though. The main problem that I see is
that there is (AFAIK) no easy way to definitively know
which migrations to unapply to roll back to the previous
verison. If you try to rollback from the new N+1 version,
you have the migrations, but no recording of the previous
version's state. If you rollback from the previous N
version, you don't have the new migration files to do the
DB rollback.

What I'd really like is a way of recording a 'db migration
checkpoint' which could be generated per-release (or
whenever else you care to checkpoint your migration
state), and would say something like `v1: {app1:0002,0003,
app2: 0004}, v2: {app1:0004, app2: 0005, 0006}`, thus
letting me roll back all of the migrations in the v2
deploy with a single command.

Does anyone have suggestions or references here? I may try
rolling the above solution if there is no prior art, but I
want to avoid reinventing the wheel here, as it seems that
this issue must have been hit by many other users before me.
-- 
You received this message because you are subscribed to

the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to django-users...@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/6cafecca-2c71-4a6f-b93b-fe3e64847bc2%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/8d8f46a7-8819-4d18-908d-9681d8b6a39e%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 pos

Re: Totally Lost on "python manage.py runserver"

2017-04-17 Thread Scot Hacker
`pip install pysqlite2` ? 

./s

On Friday, April 14, 2017 at 5:07:06 AM UTC-7, Michael Durkin wrote:
>
> I am at a loss. My Google-Fu seems to be sub-par as I cannot find an 
> answer to what I'm looking for. 
>
> I am running Ubuntu, using Python 3.6.0 (pyenv handles different Python 
> versions for me), have installed SQLite and Apache and ran "pip install 
> django" to get Django on my machine. 
>
> I have run through the Django tutorial on installation (
> https://docs.djangoproject.com/en/1.11/topics/install/#installing-official-release)
>  
> and made it all the way to "python manage.py runserver". After running that 
> line I get the following message through the shell that I simply do not 
> understand:
>
> ~/Scripts/Django_Practice/mysite$ python manage.py runserver
> Unhandled exception in thread started by  check_errors..wrapper at 0x7f0e6c4ce730>
> Traceback (most recent call last):
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py",
>  
> line 31, in 
> from pysqlite2 import dbapi2 as Database
> ModuleNotFoundError: No module named 'pysqlite2'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py",
>  
> line 33, in 
> from sqlite3 import dbapi2 as Database
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/sqlite3/__init__.py", 
> line 23, in 
> from sqlite3.dbapi2 import *
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/sqlite3/dbapi2.py", line 
> 27, in 
> from _sqlite3 import *
> ModuleNotFoundError: No module named '_sqlite3'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/utils/autoreload.py",
>  
> line 227, in wrapper
> fn(*args, **kwargs)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
>  
> line 117, in inner_run
> autoreload.raise_last_exception()
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/utils/autoreload.py",
>  
> line 250, in raise_last_exception
> six.reraise(*_exception)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/utils/six.py",
>  
> line 685, in reraise
> raise value.with_traceback(tb)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/utils/autoreload.py",
>  
> line 227, in wrapper
> fn(*args, **kwargs)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/__init__.py",
>  
> line 27, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/apps/registry.py",
>  
> line 108, in populate
> app_config.import_models()
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/apps/config.py",
>  
> line 202, in import_models
> self.models_module = import_module(models_module_name)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/importlib/__init__.py", 
> line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 978, in _gcd_import
>   File "", line 961, in _find_and_load
>   File "", line 950, in 
> _find_and_load_unlocked
>   File "", line 655, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 205, in 
> _call_with_frames_removed
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/contrib/auth/models.py",
>  
> line 4, in 
> from django.contrib.auth.base_user import AbstractBaseUser, 
> BaseUserManager
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/contrib/auth/base_user.py",
>  
> line 52, in 
> class AbstractBaseUser(models.Model):
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/db/models/base.py",
>  
> line 124, in __new__
> new_class.add_to_class('_meta', Options(meta, app_label))
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/db/models/base.py",
>  
> line 330, in add_to_class
> value.contribute_to_class(cls, name)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/db/models/options.py",
>  
> line 214, in contribute_to_class
> self.db_table = truncate_name(self.db_table, 
> connection.ops.max_name_length())
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/db/__init__.py",
>  
> line 33, in __getattr__
> return getattr(connections[DEFAULT_DB_ALIAS], item)
>   File 
> "/home/durkin/.pyenv/versions/3.6.0/lib/python3.6/site-packages/django/db/utils.py",
>  
> line 211, in __getitem__
> backend = load_backe