Mysql blob field and django

2015-09-09 Thread Andre Jonker
I use python 3.4.2 + django 1.8 + Mysql database. + Table persons with blob fields in which a photo of a person My question is how can I retrieving and saving a photo with django. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Get current user in model signal pre_save

2015-09-09 Thread Xavier Palacín Ayuso
I want to collects current user in model signal pre_save, to prevent remove super user permission to current super users. As I have now so I can not give administrative privileges to a normal user. from django.db.models.signals import pre_delete, pre_save, post_save from django.dispatch.dispatche

Django clustering - How to manage Image uploading

2015-09-09 Thread Gabriele Morgante
Hi, I developed a Django 1.8.4 webapp and now I've to deploy it in production environment. The app allows users to upload images on the server. My problem is that in a production environment I've many servers with django deployed and a load balancer. Than, how can I manage Image uploading in a

Re: Django clustering - How to manage Image uploading

2015-09-09 Thread Andreas Kuhne
I would use something like Amazon S3 to store the images. I think that's the easiest way to do it. If you use the django-storages plugin, you can configure your servers to talk to S3 just like they were using local storage. You will never have any problems with diskspace and all of your servers wil

Re: Django clustering - How to manage Image uploading

2015-09-09 Thread Robin Lery
You upload all your images into s3. On 9 Sep 2015 17:23, "Gabriele Morgante" wrote: > Hi, > > I developed a Django 1.8.4 webapp and now I've to deploy it in production > environment. The app allows users to upload images on the server. My > problem is that in a production environment I've many se

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread ThomasTheDjangoFan
Hi Gergely, thanks a lot for the quick response. Well... I am an Javascript Beginner and I need to start it from scratch. The project *definetly needs more Javascript-UI Compontents* than what bootstrap gives us. + *Interactive UI Elements* that show the same content and update each others + Mo

Re: Django clustering - How to manage Image uploading

2015-09-09 Thread nsbk
Or set up an NFS share if you don't want to rely on third party services https://help.ubuntu.com/14.04/serverguide/network-file-system.html On Wednesday, 9 September 2015 13:54:46 UTC+2, Gabriele Morgante wrote: > > Hi, > > I developed a Django 1.8.4 webapp and now I've to deploy it in production

Re: API Google Calendar

2015-09-09 Thread ThomasTheDjangoFan
Hi Marcelo, I am actually also planning to use it. I have found https://code.google.com/p/django-gcal/ and will have a look at: https://www.djangopackages.com/grids/g/calendar/. None of this I have checked out myself. Let's keep us up to date with the progress. Kind regards Thomas Am Donnerst

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread Gergely Polonkai
Hello, I never used React.js before, only Angular, which already has some support: https://github.com/jrief/django-angular For react, it seems there’s only confusion yet, but I guess that’s mostly because React.js itself is pretty new. Also, if you are already confortable with Python (and Djang

Re: Adding dynamic methods to ModelAdmin fails in 1.8

2015-09-09 Thread Malcolm Box
Hi Simon, Thanks for the pointer, but I don't think that helps. The fields are already declared using the existing fields / readonly_fields attributes on the ExampleAdmin class - and this is what get_fields / get_readonly_fields return. The system check fails because the fields declared don't exi

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread 'Tom Evans' via Django users
On Tue, Sep 8, 2015 at 11:12 PM, ThomasTheDjangoFan wrote: > Hi guys, > > I have invested quite a lot of time & energy into learning django and I feel > comfy using it. (I have studied the 2 Scoops, the Tdd book and got the boook > "Scaling Django" and "lightweight Django" right here next to me).

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread Javier Guerra Giraldez
On Wed, Sep 9, 2015 at 9:32 AM, 'Tom Evans' via Django users wrote: > We have (different!) django projects using react, backbone and > angular. and lots more! i've found riot.js a very refreshing foundation for those of us that hate JS. -- Javier -- You received this message because you are

Hide specific users from auth user model for non super users

2015-09-09 Thread Xavier Palacín Ayuso
I need hide a super admin's users from auth user model of Django of list users template for a normal users or no super admin users. -- 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

Re: Adding dynamic methods to ModelAdmin fails in 1.8

2015-09-09 Thread Simon Charette
Hi Malcom, What I meant to suggest is to remove the fields from `fields`/`readonly_fields` and dynamically return them in the `get_(fields|readonly_fields)` fields method. e.g. class ThumbnailFieldsAdmin(models.ModelAdmin): fields = [] readonly_fields = [] thumbnail_fields = []

How To Make Django Models.

2015-09-09 Thread Steve Burrus
*I am sorry thart I don't know much more about Django than I do but could someone please inform me about how do I make a Model? i haven't moved beyond connecting to the Django server yet and configuring the admin.* -- You received this message because you are subscribed to the Google Group

Re: How To Make Django Models.

2015-09-09 Thread James Schneider
Have you gone through the tutorial? Creating models is part of the first page: https://docs.djangoproject.com/en/1.8/intro/tutorial01/#creating-models -James On Sep 9, 2015 10:39 AM, "Steve Burrus" wrote: > *I am sorry thart I don't know much more about Django than I do but could > someone plea

have the sql for a django migration automatically be in the migration

2015-09-09 Thread Alec Brunelle
`python manage.py makemigrations --sql` would then have as a string in your migrations the sql that is actually runs. I know you can do this with `python manage.py *sqlmigrate* appname migrationnumber` but then you have to remember to copy and paste every time. How useful would this feature be

Plugging in Require.js

2015-09-09 Thread Christos Jonathan Seth Hayward
I asked how to plug in Require.js at: http://stackoverflow.com/questions/32483810/how-do-i-think-and-act-in-require-js-if-i-have-a-script-src-background-a ​What should I be doing, and what packages should I be using, to be able to use Require.js? Thanks,​ -- [image: Christos Jonathan Seth Ha

Sending a FileField attachment by email

2015-09-09 Thread Hugo Kitano
I'm having problems sending a FileField attachment via email. This should send an email, but doesn't. Is there something I have to configure in my gmail account for this to work? settings.py: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_USE_TLS = True EMAIL_HOST =

can't delete user after removing app

2015-09-09 Thread Larry Martell
I have a django project that has many different apps. We deleted one of the apps, and now when we try and delete a user it fails, complaining about a table from that app not existing. There are no references to that app, or table anywhere. Testing, I found that if I create the table the error goes

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread ThomasTheDjangoFan
Yeah, I definetly hate to write Javascript and I really do NOT want to write server code in it. *The parts where I really need a javascript framework in my app are complex forms:A page might consist of multiple forms bundled with formsets, inline-forms and so on.* *The question is:*Which js-

Re: Django for data management in a no-UI application?

2015-09-09 Thread jsachs
Thanks, that's a clear answer. As a bonus, it's the one I was hoping for. :) The UI will be web-based. A native OS GUI would be cool, but 'way overkill. The application that will be used internally by a small number of people. It automates some production processes, and having a GUI at all is a

Customization in User Add screen

2015-09-09 Thread Pawanesh Gautam
how to add extra field in user add screen ?? -- 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, s

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread Gergely Polonkai
Hello, this is a bit off topic here, and highly opinion based, but here are my two cents: I got along very well with both Bootstrap and Angular, but never tried React before. However, a quick Google search shows that React is barely supported yet (in terms of available Django apps). Best, Gergely

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread Mario Gudelj
+1 angular. Stack overflow is your friend and there's a lot of angular on it. You can do a lot with it with basic knowledge as well. And template syntax will make sense going to it from django On 10 Sep 2015 3:53 pm, "Gergely Polonkai" wrote: > Hello, > > this is a bit off topic here, and highly