Re: Simple to say but difficult in django?

2016-04-10 Thread Luca Brandi
You are right: these files should be downloadable only to authenticated users.. If not in the static folder, where should I store them and how to make them downloadable? thanks Il giorno sabato 9 aprile 2016 19:13:12 UTC+2, Vijay Khemlani ha scritto: > > Your question seems to be incomplete > >

How, in django, using mock for mocking Image file and non-image file with creating real files?

2016-04-10 Thread Seti Volkylany
I do not want to pollute the system temporary files for testing, maybe someone knows how to create a mock object for testing field ImageField -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

In a new Model with a OneToOne(User) relationship, how to get the username?

2016-04-10 Thread Andrew Chiw
class Client(UserenaBaseProfile): def __str__(self): return self.name user = models.OneToOneField(User, unique=True, verbose_name=_('Django Login'), related_name='client') name = mo

a question about redis cache

2016-04-10 Thread Xin Liu
Let's look at the following scenario: A website has 1 player, to make question easier, I use mysql storage player with just one table: "player_table" --table here- name string score int now, I want to show Top 100 of those players by socre. if only with mysql, I have to caculate Top

a design about cache(using redis) , and some problem about it

2016-04-10 Thread Xin Liu
Now, Let's look at the following scenario: A website manage 10,000 students, and show top 100 of student's achievement. I use mysql storage every student personal information(name email sex and achievement) but I have to get every student achievement and caculate Top 100, so I use redis to solve

Re: Pycharm and DJANGO_SETTINGS_MODULE

2016-04-10 Thread Avraham Serour
the run configuration is separate from the console environment On Thu, Apr 7, 2016 at 7:59 PM, Dariusz Mysior wrote: > Hi in linux console it's ok but in Pycharm in IPython console when I > execute f.e. from django.contrib.auth.models import AbstractUser i have bug > like below > > > django.cor

In a new Model with a OneToOne(User) relationship, how to get the username?

2016-04-10 Thread jorrit787
I'm not sure you can use default the way you are using on the name field, but in case you can: the names of the fields in User are username, firstname, and lastname, so you can try user.username, user.firstname or user.lastname . -- You received this message because you are subscribed to the Go

Re: What Python/Django code checkers do you recommend?...

2016-04-10 Thread Avraham Serour
I use all, specially because they are free for open source On Fri, Apr 8, 2016 at 7:00 PM, Fred Stluka wrote: > Python/Django programmers, > > What code review tools do you use? Do you run them automatically > when checking in new code? Do you recommend them? > > Details: > > I'm working on a

Re: a question about redis cache

2016-04-10 Thread Avraham Serour
why do you want to use redis for this?, top is trivial to the database On Sun, Apr 10, 2016 at 3:22 PM, Xin Liu wrote: > Let's look at the following scenario: > A website has 1 player, to make question easier, I use mysql storage > player with just one table: "player_table" > --table h

Re: a question about redis cache

2016-04-10 Thread Bob Gailer
Why not just use Redit? On Apr 10, 2016 8:38 AM, "Xin Liu" wrote: > > Let's look at the following scenario: > A website has 1 player, to make question easier, I use mysql storage player with just one table: "player_table" > --table here- > name string > score int > > now, I want to s

Re: Rendering Form Fields That Are Passed To Context Inside Of An Object

2016-04-10 Thread David McWilliams
I'm pretty sure that I have them correct -- it'd be weird if I'd managed to include a typo in all six fields of the real form -- but I'll double check it on Monday when I get back into the office. And thanks, I'll look into Formsets too! On Saturday, April 9, 2016 at 9:25:40 AM UTC-5, jorr...@

Re: google/bing maps using django

2016-04-10 Thread Xristos Xristoou
@sergiy khohlov i try to follow this toturial http://fle.github.io/easy-webmapping-with-django-leaflet-and-django-geojson.html but in my admin(administrator page) i cant to add points because dont show me the map,can you help me ? Τη Σάββατο, 9 Απριλίου 2016 - 10:50:08 μ.μ. UTC+3, ο χρήστης Xr

Emails to users

2016-04-10 Thread Luca Brandi
Hi I am wondering how the admin can communicate to his users...Is there a way for example to create email templates and then email them to user? THANKS -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: Emails to users

2016-04-10 Thread Avraham Serour
Of course there's, you'll need to create email templates and then email the users On Sun, Apr 10, 2016, 8:47 PM Luca Brandi wrote: > Hi > I am wondering how the admin can communicate to his users...Is there a way > for example to create email templates and then email them to user? THANKS > > --

Re: Trouble getting posted

2016-04-10 Thread Gary Roach
Actually James, I don't think that is true. I run a group for a project and have no trouble getting returns on my posts. This is a feature that can be turned on/off a I recall. I have no trouble getting my posts returned with this site but only with my debian-user site. I think the trouble is w

[Sharing] a django app to apply filters on drf querysets using query params with validations using voluptuous.

2016-04-10 Thread Manjit Kumar
https://github.com/manjitkumar/drf-url-filters *drf-url-filters* is a simple django app to apply filters on drf modelviewset's queryset in a clean, simple and configurable way. It also supports validations on incoming query params and their values. A beautiful python package voluptouos is being

Re: In a new Model with a OneToOne(User) relationship, how to get the username?

2016-04-10 Thread Mike Dewhirst
On 10/04/2016 10:12 PM, Andrew Chiw wrote: | classClient(UserenaBaseProfile):   def__str__(self):     returnself.name   user =models.OneToOneField(User,                 unique=True,                 verbose_name=_('Djan

Re: Trouble getting posted

2016-04-10 Thread James Schneider
> > Actually James, I don't think that is true. I run a group for a project > and have no trouble getting returns on my posts. This is a feature that can > be turned on/off a I recall. I have no trouble getting my posts returned > with this site but only with my debian-user site. I think the troubl