Re: New to Django

2016-08-16 Thread Luis Zárate
Hi, Try to implement a custom tag that can print Any dictionary in the form that you want. https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/ El martes, 16 de agosto de 2016, Wolf Painter escribió: > Anyone have any ideas? I'm really stuck here... > >

Re: New to Django

2016-08-16 Thread Wolf Painter
Anyone have any ideas? I'm really stuck here... -- 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

Re: Migrations for forms fields

2016-08-16 Thread ludovic coues
forms.Form are python class representing an HTML form. You use them to ask data to your user. Nothing more. models.Model are python class representing an entry in your database. You create them in python, always. Sometimes, you use a form by itself. For exemple, a login form will ask data,

Re: nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread 술욱
I found the problem. We run our MySql in master-slave. Somehow, our slave was out of sync. We updated some tables but this app was reading our slave. Thanks all!! 2016-08-16 15:58 GMT-03:00 Avraham Serour : > did you checked if it cached in the browser? does nginx gets

Re: Using the Django ORM in a long-running worker process

2016-08-16 Thread Daniel Tao
Can I bump this topic back to the top? 1. I actually don't know if this will work (not an experienced Google Groups user here). 2. Even if it does work, I don't know if this is considered bad form or something. If so, apologies. On Monday, August 15, 2016 at 11:28:26 AM UTC-5,

Re: Advice on python version for new project

2016-08-16 Thread Rich Shepard
On Tue, 16 Aug 2016, Avraham Serour wrote: https://virtualenv.pypa.io/en/stable/ Thanks, Avraham. Looks interesting. Rich

Re: Advice on python version for new project

2016-08-16 Thread Avraham Serour
https://virtualenv.pypa.io/en/stable/ On Tue, Aug 16, 2016 at 1:36 AM, Rich Shepard wrote: > On Tue, 16 Aug 2016, Avraham Serour wrote: > > you should also create a virtualenv for the project >> > > Avraham, > > OK. Please point me to some docs for this. > >

Re: nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread Avraham Serour
did you checked if it cached in the browser? does nginx gets the request? if so what does it answers? On Tue, Aug 16, 2016 at 7:07 PM, 술욱 wrote: > Because this particular query runs in about 30 seconds and its result ends > up in an excel file, which is generated with

Subtracting UNIX_TIMESTAMPS broke in Django 1.10

2016-08-16 Thread Dan Edwards
I have a query that works in Django 1.9.9 but not 1.10. Running on CentOS 7, with python 2.7.5, and MySQL 5.6.23 on Amazon RDS Example: class TaskLog(models.Model): id = models.AutoField(primary_key=True) start = models.DateTimeField(auto_now_add=True) stop =

How to save one field value from a model to another field of a linked model.

2016-08-16 Thread Md. Ohiduzzaman
I have designed a linked model named Shiftdate as: class Shiftdate(models.Model): shift_date = models.DateField(blank=False,unique=True) sit_date = models.ForeignKey(Sitting, on_delete=models.CASCADE) Using this model I changed sit_date to shift_date which

How to save one field value from a model to another model field

2016-08-16 Thread Md. Ohiduzzaman
down votefavorite I designed two models: one model for storing Sitting date and another mode for storing Shifting date. Two model are linked by foreign key. Here is my two models: class Sitting(models.Model):

Re: Forcing Localization

2016-08-16 Thread Fred Stluka
Adam, Is it possible to force localization to a particular regional standard, no matter where I am viewing the page from? I don't know for sure, but it seems like some of these settings should be relevant.  It's a place to start anyhow.  Anyone have

Re: nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread 술욱
Because this particular query runs in about 30 seconds and its result ends up in an excel file, which is generated with openpyxl from a template. If I change the template, the file returned by django is this new file, but its contents, the query result, doesn't (and it executes immediately). --

Re: nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread Bill Freeman
Cached in browser, maybe? On Tue, Aug 16, 2016 at 11:43 AM, Avraham Serour wrote: > How do you know the query is cached? > > On Aug 16, 2016 6:33 PM, "술욱" wrote: > >> I forgot to say I reloaded (and restarted) nginx and uwsgi, but the query >> is still

Re: nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread Avraham Serour
How do you know the query is cached? On Aug 16, 2016 6:33 PM, "술욱" wrote: > I forgot to say I reloaded (and restarted) nginx and uwsgi, but the query > is still cached > > > Thanks anyway! > > > > > 2016-08-16 12:24 GMT-03:00 M Hashmi : > >> Reload Nginx

Re: nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread 술욱
I forgot to say I reloaded (and restarted) nginx and uwsgi, but the query is still cached Thanks anyway! 2016-08-16 12:24 GMT-03:00 M Hashmi : > Reload Nginx and see if still its loading cached query. > > On Tue, Aug 16, 2016 at 8:18 AM, 술욱 wrote: >

Re: nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread M Hashmi
Reload Nginx and see if still its loading cached query. On Tue, Aug 16, 2016 at 8:18 AM, 술욱 wrote: > Hello > > I'm running (in production) and app that uses raw queries, something like: > > query = """ > select table1.field1, table2.field3 > from table1 left join table2 >

nginx+uwsgi, cache somewhere but I don't know where

2016-08-16 Thread 술욱
Hello I'm running (in production) and app that uses raw queries, something like: query = """ select table1.field1, table2.field3 from table1 left join table2 on test1.field1 = test2.field1 and test1.field2 = test2.field2 where table1.field1 = %(param1)s """ cursor =

Re: Web based IDE for django

2016-08-16 Thread Daniel França
hmm, not sure if I got what you want...but have you tried cloud9? https://c9.io/ On Tue, 16 Aug 2016 at 07:30 Jani Tiainen wrote: > Hi, > > Just for curiosity, can you point out any web based editor does what > you're asking for, even not Python based? > > To me it sounds

Re: How to use django.contrib.postgres.forms widgets in the admin site

2016-08-16 Thread François Schiettecatte
Go to the group web page at : https://groups.google.com/group/django-users Click on the My Settings icon (human figure and gear icon, top right) and click ‘Leave this group’ François > On Aug 16, 2016, at 6:28 AM, Elizabeth Mawer > wrote: > > Hi > > I

Re: How to use django.contrib.postgres.forms widgets in the admin site

2016-08-16 Thread Elizabeth Mawer
Hi I accidentally got signed up with this group and actually don't want to receive emails. How do I unsubscribe? At the bottom of this email it says: To unsubscribe from this group and stop receiving emails from it, send an email to

How to use django.contrib.postgres.forms widgets in the admin site

2016-08-16 Thread Jay Sheldon
Hi there, I just recently updated my database to postgres, looking to play with the django supported field types HStoreField and JSONField (reference: https://docs.djangoproject.com/en/1.8/ref/contrib/postgres/fields/ ) I got the install working fine, but in my admin section - the widgets

Form Mixins with multilayered M2M models

2016-08-16 Thread Ali khan
Hi, I have three models like below: Shop: | Products | Variations Where Shop has a ForeignKey for products and then products has foreign key for variations. So Shop has no ForeignKey with Variations directly instead connected

Re: Migrations for forms fields

2016-08-16 Thread Gergely Polonkai
Hello, rename migrations in your head to database migrations, or even model to database migrations. The migration process takes all your models and applies all the changes in them to your database (usually an SQL instance in the wild). Forms, on the other hand, are just that: forms, that can