Young & Fast growing Open Source MySQL CRUD desktop application.

2016-06-03 Thread Garry Lachman
Young & Fast growing Open Source MySQL CRUD desktop application. 100% Open Source hosted in GitHub. http://garrylachman.github.io/ElectroCRUD/?utm_source=google&utm_medium=groups&utm_campaign=groups1 Thanks, Have, fun :) -- You received this message because you are subscribed to the Goog

Help with Aggregation / Annotation

2016-06-03 Thread Alex G
Hello all, I know this is probably a really simple question, but I've been trying to solve it for ages now and keep failing! I have two models: class Subject(models.Model): name = models.CharField(max_length=200) class Pupil(models.Model): first_name = models.CharField(max_length=200)

Why is my Django template not displaying?

2016-06-03 Thread Dave N
Assuming my model contains data, I have myapp/views.py: from django.template import RequestContextfrom django.shortcuts import renderfrom .models import Historyimport datetime def live_view(request): context = RequestContext(request) plays_list = History.objects.filter(date=datetime.date(

Question regarding the separation of roles between Field and Widget

2016-06-03 Thread Raffi Enficiaud
Dear Django users, This is my first post on this ML, please excuse me if my question sounds weird. My question is about the separation of roles between Widget and Field, in the context of eg. a serialization/deserialization of a list of values using JSON. It concerns especially the "Field.to_p

Re: Django 1.9 ./manage.py migrate error

2016-06-03 Thread Tejesh Papineni
its working when already have a db because views.py are using Models from already existing db. But when creating new db, code in views.py is trying to access Models that have not yet been built using ./manage.py migrate. My solution is to comment code in views.py that accesses Models or try exce

Re: Why is my Django template not displaying?

2016-06-03 Thread James Schneider
On Jun 3, 2016 8:58 AM, "Dave N" wrote: > > Assuming my model contains data, I have myapp/views.py: > > from django.template import RequestContext > from django.shortcuts import render > from .models import History > import datetime > > def live_view(request): > context = RequestContext(reques

How to resize and store pics with Django

2016-06-03 Thread ivan77
HI, I would like my Django App to have the functionality where a person can upload pictures (that would be resized). Can you please give me any advice on the best way to do that in Django. I will be using a postgres DB for the app. Also, if there are any Python/Django apps that you can sug

Re: How to resize and store pics with Django

2016-06-03 Thread Ketan Bhatt
This is how you can compress the images while saving: ```python import urllib2 import cStringIO from boto3.session import Session from PIL import Image aws_session = Session( aws_access_key_id=settings.AWS_ACCESS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY, region

Re: How to resize and store pics with Django

2016-06-03 Thread ivan77
Hi Ketan, Thanks for the information! How is it that you keep the images associated with other tables in the database? What I am specifically thinking about is if you want to associate specific images with specific users who uploaded, for example? Some kind of bridge (many to many table)?

Re: How to resize and store pics with Django

2016-06-03 Thread Ketan Bhatt
I am storing links of these images as I need to show them on the frontend, not connected to any user. But I have done what you are talking about too. So Django gives you a Model File Field. Add that to your Model. That will allow you to save and store files. While saving a model object, just use t

URL design

2016-06-03 Thread Горобец Дмитрий
Hello, guys. I have the following URL patterns in my urls.py module and I'd like to refactor them: url(r'^(?P[a-zA-Z0-9_\-]+)/(?P[a-zA-Z0-9_\-]+)/$', views.item_list, name="item_location_category"), url(r'^(?P[a-zA-Z0-9_\-]+)/(?P[a-zA-Z0-9_\-]+)/(?P[a-zA-Z0-9_\-]+)/$', views.item_list), url(r'

Re: Why is my Django template not displaying?

2016-06-03 Thread Dave N
That absolutely did it James - I thought I was accessing the instance, but what I needed was to access the template context contents of the instance. Also, great tip with the django debug toolbar - I've had it installed, but didn't know how much it actually shows! On Friday, June 3, 2016 at 8:5

Re: How to resize and store pics with Django

2016-06-03 Thread ivan77
Thanks! On Friday, June 3, 2016 at 2:08:01 PM UTC-4, Ketan Bhatt wrote: > > I am storing links of these images as I need to show them on the frontend, > not connected to any user. > > But I have done what you are talking about too. > So Django gives you a Model File Field. Add that to your Mode

Re: How to resize and store pics with Django

2016-06-03 Thread monoBOT
You should take a look to this plugin ... does exactly what you need. http://djangothumbnails.com/ the user uploads the image and you create as many thumbnails for thoses images as needed 2016-06-03 21:07 GMT+01:00 ivan77 : > Thanks! > > On Friday, June 3, 2016 at 2:08:01 PM UTC-4, Ketan Bhatt

Is a good practice to put app inside another?

2016-06-03 Thread Neto
My project has several apps, some of them depend on others, it is ok to add for example 3 apps within another app? -- 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

Django inside Docker

2016-06-03 Thread Davi Diório Mendes
Hi everyone, I was developing with django localy, in my laptop, and my manager asked to project run inside a docker. I did and now django can't find my templates :( I appreciate any help, my Dockerfile is attached. BR. -- You received this message because you are subscribed to the Google Gro

Re: Django inside Docker

2016-06-03 Thread Larry Martell
You could try posting on the docker forum: https://forums.docker.com On Fri, Jun 3, 2016 at 4:49 PM, Davi Diório Mendes wrote: > Hi everyone, > > I was developing with django localy, in my laptop, and my manager asked to > project run inside a docker. > > I did and now django can't find my templa

Re: Django inside Docker

2016-06-03 Thread Ezequiel Bertti
Why didn't you use image from official django. https://hub.docker.com/_/django/ FROM django:onbuild On Fri, Jun 3, 2016 at 5:49 PM, Davi Diório Mendes wrote: > Hi everyone, > > I was developing with django localy, in my laptop, and my manager asked to > project run inside a docker. > > I di

Re: Is a good practice to put app inside another?

2016-06-03 Thread Carl Meyer
On 06/03/2016 01:37 PM, Neto wrote: > My project has several apps, some of them depend on others, it is ok to > add for example 3 apps within another app? Yep, there's nothing wrong with this. An "app" is just a Python package; nesting Python packages to achieve a logical grouping/hierarchy is a p

Re: Why is my Django template not displaying?

2016-06-03 Thread Luis Zárate
Use plays as a list in form. You are passing context_list as context object so all variable inside context_list are available in template but not context_list. Other option is return render(request,'live.html', {"context_list": context_list}) El viernes, 3 de junio de 2016, Dave N escribió: >

Re: Is a good practice to put app inside another?

2016-06-03 Thread Luis Zárate
Django contrib is a good example of how put app inside other package. El viernes, 3 de junio de 2016, Carl Meyer escribió: > On 06/03/2016 01:37 PM, Neto wrote: >> My project has several apps, some of them depend on others, it is ok to >> add for example 3 apps within another app? > > Yep, there'

Re: URL design

2016-06-03 Thread Luis Zárate
I can test this right now but based in my experience in re I think could be like this url(r'^(?P[a-zA-Z0-9_\-]+)/(?P[a-zA-Z0-9_\-]+)/(?P([a-zA-Z0-9_\-]+)/){7})$', views.item_list) Be worry with / in views El viernes, 3 de junio de 2016, Горобец Дмитрий escribió: > Hello, guys. > I have the foll