On Mon, Apr 20, 2015 at 9:45 PM, Vijay Khemlani wrote:
> Overwrite the constructor of the form (__init__), pass the user or whatever
> parameters you may need and overwrite the choices of the field in the body
> of the method.
This is the same strategy I've used to filter ForeignKey fields on the
Overwrite the constructor of the form (__init__), pass the user or whatever
parameters you may need and overwrite the choices of the field in the body
of the method.
On Mon, Apr 20, 2015 at 10:56 PM, Steve Hiemstra
wrote:
> I am trying to build a form with dynamic choices. e.g., the choices shou
I am trying to build a form with dynamic choices. e.g., the choices should
depend on the user.
https://docs.djangoproject.com/en/1.8/ref/forms/fields/#choicefield
Says choices may now be a callable, and sure enough it is called in `
django/forms/fields.py(818)` – but without any parameters.
How
> Den 20/04/2015 kl. 19.46 skrev SHINTO PETER :
>
> Working with linux/unix
If unix includes FreeBSD, check out
https://www.freebsd.org/doc/en/books/handbook/security-resourcelimits.html
Erik
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
On 2015-04-20 16:01, François Schiettecatte wrote:
> I did a little research on this and found cpulimit, you can also
> use nice and renice,
Yes, nice/renice and their I/O friend ionice (in my Debian
installation, it's part of the "util-linux" package) work quite
nicely. It's the memory-limiting
I'm upgrading from Django 1.6 and south to Django 1.8.
Following the instructions
at:
https://docs.djangoproject.com/en/1.8/topics/migrations/#upgrading-from-south
seems to work initially but then realize that the user model wasn't
updated:
https://github.com/django/django/tree/1.8/django/co
I moving from Django 1.6 and south to Django 1.8. I followed the
instructions
at
https://docs.djangoproject.com/en/1.8/topics/migrations/#upgrading-from-south
and things seemed to work fine. Then I noticed that the auth migrations did
not get applied to the database
(https://github.com/django
I did a little research on this and found cpulimit, you can also use nice and
renice, and (on fedora core 21 at least) you can do 'cat /proc/###/status’
where ### is the process ID which will give you memory stats on a process. Not
ideal but you can wrap all of these in some python to make it ea
On 2015-04-20 13:54, François Schiettecatte wrote:
> Peter, why do you want to limit memory and CPU usage? To prevent
> someone from killing the machine ?
I know I've wanted it to help prevent malicious data that could suck
up my RAM and push things into swap. Absent "ulimit -a", I've had to
work
Bummer, shows how long it has been since I have used that.
Peter, why do you want to limit memory and CPU usage? To prevent someone from
killing the machine ?
F.
> On Apr 20, 2015, at 1:47 PM, Tim Chase wrote:
>
> On 2015-04-20 13:13, François Schiettecatte wrote:
>> You don’t say what platfo
Working with linux/unix
On Monday, 20 April 2015 22:44:17 UTC+5:30, François Schiettecatte wrote:
>
> You don’t say what platform you are running on, but on linux/unix you can
> use ulimit, see http://ss64.com/bash/ulimit.html
>
> François
>
> > On Apr 20, 2015, at 1:09 PM, SHINTO PETER > wrot
On 2015-04-20 13:13, François Schiettecatte wrote:
> You don’t say what platform you are running on, but on linux/unix
> you can use ulimit, see http://ss64.com/bash/ulimit.html
I've wanted this occasionally, but "ulimit -m" doesn't appear to work
on most modern Linux installations. See
http://u
In the model below, using the Django admin, no matter what value I choose,
it always displays the default value. But writes the correct value in the
database. Am I doing something wrong or is this a bug?
TENSAO_220 = Decimal(220)
TENSAO_110 = Decimal(110)
TENSOES = ((TENSAO_220, '220 volts'),
You don’t say what platform you are running on, but on linux/unix you can use
ulimit, see http://ss64.com/bash/ulimit.html
François
> On Apr 20, 2015, at 1:09 PM, SHINTO PETER wrote:
>
> how to limit memory utilization for a particular python script ?
>
> --
> You received this message becau
how to limit memory utilization for a particular python script ?
--
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 po
Are the queries associated with a certain form? Or they are arbitrary
queries?
On Mon, Apr 20, 2015 at 10:01 AM, guettli wrote:
> We want to store the QuerySet query (not the result) some how.
>
> Background: users should be able to save a complex query as "my favorite
> query".
>
> Pickling que
On Mon, Apr 20, 2015 at 10:31 AM, David Pineda wrote:
> Hello
> I'm a begginner in django and i need to work with a form (send a file) and
> when the file it's ok run a bash scripts to process that.
>
> I investigate and the common recomendation si use 'subprocess' an 'sys'
> So, i can set the pa
Hello
I'm a begginner in django and i need to work with a form (send a file) and
when the file it's ok run a bash scripts to process that.
I investigate and the common recomendation si use 'subprocess' an 'sys'
So, i can set the path with de bash app, but the system only recognize the
'echo' comm
Hi all,
Am 20.04.2015 um 15:29 schrieb Carsten Fuchs:
I use a ModelAdmin.save_formset() method exactly like in the Django Admin
documentation:
https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_formset
[...]
The problem is, if I check the "delete?" c
Thank you Tom.
Somehow it seemed strange to test this view using client.get('/page/', {
'filter': 'one and two'})
but I get why it is like this.
Cheers,
Eneko
On Monday, April 20, 2015 at 3:30:55 PM UTC+2, Tom Evans wrote:
>
> On Sat, Apr 18, 2015 at 12:13 PM, Eneko Illarramendi
> > wrote:
>
On Sat, Apr 18, 2015 at 12:13 PM, Eneko Illarramendi
wrote:
> Previously posted in SO:
> http://stackoverflow.com/questions/29703930/testing-request-parameters-in-django-behaves-differently
> ---
>
> I have a Django View that uses a query parameter to so some content
> filterin
Dear Django fellows,
I use a ModelAdmin.save_formset() method exactly like in the Django Admin
documentation:
https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_formset
This is the exact code:
def save_formset(self, request, form, formset, change)
You might want to start by posting what you have learned so far (with some
effort shown). Otherwise, you are asking people to complete your homework
for you. Otherwise, post most specific questions for clarification.
On Saturday, April 18, 2015 at 8:52:13 AM UTC-4, Jasvir Singh wrote:
>
> Hi
We want to store the QuerySet query (not the result) some how.
Background: users should be able to save a complex query as "my favorite
query".
Pickling querysets is possible, but version updates are not supported:
https://docs.djangoproject.com/en/1.8/ref/models/querysets/#pickling-queryset
Hi everyone,
i had one json data like this to table say "data"
{
id:##,
name:{fname:##,lname:##},
class:##,
age:##,
courses:[###,###,###,###]
}
How to map this json data to a relational database??
i understand that only two things are possible :make fname and lname as a
column of data table or
Beatrice,
Beatrice Galvani schrieb (16.04.2015 17:34 Uhr):
Hi, I'm using Django 1.7.2, Python 3.4.
My trouble is: I have a simple function in some directory written in
python (e.g. a counter since 0 to 10); I would like to see these numbers
on my monitor on the HTML page.. I know how start th
26 matches
Mail list logo