Override Django Mptt Admin Queryset

2014-11-18 Thread Neeraj Sharma
Hi, I want to override django mptt admin queryset, i want to filter the the queryset. I also tried the following method in admin.py but its not working. def queryset(self, request): qs = super(DataField_NEWAdmin, self).queryset(request) return qs.filter(game_event__id=10)

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Carl Meyer
Hi Tobias, On 11/18/2014 11:44 AM, Tobias Dacoir wrote: > Dear Daniel and Carl, > > thanks for your advice. However I'm a bit confused now. So in general > you recommend that I follow the guide for substituting my own custom > model but at the same time Carl is warning me that overwriting >

Re: moving existing django projects

2014-11-18 Thread Carl Meyer
Hi Malik, On 11/18/2014 02:32 PM, Malik Rumi wrote: [snip] > Here are my console logs: The console logs certainly suggest that the root of the problem is in what files you have in git, but there's not much clue why certain files or directories might be disappearing. Carl signature.asc

FieldDoesNotExist Error in Tutorial Part 1

2014-11-18 Thread Derek Ng
Hi, I'm am trying to follow along with the tutorial, but keep getting this error when I migrate the models. Here is my models.py file for the polls app: from django.db import models class Question(models.Model): question_text = models.CharField(max_length=200) pub_date =

Squid or Varnish for Django?

2014-11-18 Thread Trupti W
Hi all, I have a django application that needs to be built to scale in the future. I am considering http caching & ESI for the solution. Has any of you any experience with either Squid or Varnish? What works better with Django? I just want the caching & ESI functionality. We are using NGINX

Re: moving existing django projects

2014-11-18 Thread Malik Rumi
Well, yes, Carl, I am a self taught newby learning all the assumptions, blind spots, and gotchas as I go stumbling through my learning curve. So thank you for your input. Yes, this is gunicorn. Entirely possible. I have another thread going where I learned that Heroku ascribes to 12 Factor, not

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Tobias Dacoir
Dear Daniel and Carl, thanks for your advice. However I'm a bit confused now. So in general you recommend that I follow the guide for substituting my own custom model but at the same time Carl is warning me that overwriting AUTH_USER_MODEL is quite painful for an existing application (right

Re: Using Related Names Not Working

2014-11-18 Thread Shaun Livingston
Yeah, I was on the #django IRC yesterday and they were saying something similiar, that I should switch it to a ManyToManyField. I did so, and also tried making it a ForeignKey, but both without success. As far as trying your thought specifically, I changed GenericRelation to ForeignKey and

Re: How to stop testserver from within a test case?

2014-11-18 Thread Erik Cederstrand
> Den 18/11/2014 kl. 16.50 skrev Arun Marathe : > > For a somewhat obscure reason, I need to stop the testserver from within a > test case. Any ideas? > I would like a programmatic solution if possible. Finding a process and > killing it (ps -ef., then grep, > then kill)

Re: ImportError: cannot import name 'GEOSException'

2014-11-18 Thread jogaserbia
> > I just realized something. > This are all the files in django.contrib.gis.geos: Notice there is no GEOSException, nor is there GEOSGeometry. There is however geometry.py (which as the class GEOSGeometry in it) and error.py (which has the class GEOSException in it). I am not sure

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Carl Meyer
Hi Tobias & Daniel, On 11/18/2014 09:10 AM, Daniel Roseman wrote: > On Tuesday, 18 November 2014 15:04:19 UTC, Tobias Dacoir wrote: > > I'm trying to figure out how to create my Custom User Model. > > In the official docs I basically found two different strategies: > Extending User

Re: Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Daniel Roseman
On Tuesday, 18 November 2014 15:04:19 UTC, Tobias Dacoir wrote: > > I'm trying to figure out how to create my Custom User Model. > > In the official docs I basically found two different strategies: Extending > User Model or Custom User Model: >

How to stop testserver from within a test case?

2014-11-18 Thread Arun Marathe
We have Django 1.6. For a somewhat obscure reason, I need to stop the testserver from within a test case. Any ideas? I would like a programmatic solution if possible. Finding a process and killing it (ps -ef., then grep, then kill) is bit of a hack, and may end up killing unintended processes.

Extending, inheriting User Model or custom User Model?

2014-11-18 Thread Tobias Dacoir
I'm trying to figure out how to create my Custom User Model. In the official docs I basically found two different strategies: Extending User Model or Custom User Model: https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#extending-the-existing-user-model Extending means I have a

Re: ImportError: cannot import name 'GEOSException'

2014-11-18 Thread jogaserbia
I got the same error when I run the following command in the Python Shell: from django.contrib.gis.db import models -- 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

Re: ImportError: cannot import name 'GEOSException'

2014-11-18 Thread jogaserbia
Python 3.4 On Tuesday, November 18, 2014 9:15:29 AM UTC-5, jogaserbia wrote: > > Forgot to mention Django 1.7. > > Thanks, > > Ivan > -- 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

Re: ImportError: cannot import name 'GEOSException'

2014-11-18 Thread jogaserbia
Forgot to mention Django 1.7. Thanks, Ivan -- 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,

ImportError: cannot import name 'GEOSException'

2014-11-18 Thread jogaserbia
Hi, I am trying to get GeoDjango up and running. I followed these instructions (on Windows 7, Postgres 9.3.5). I followed these instructions: https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#windows And get the error ImportError: cannot import name 'GEOSException' I am

Re: Postawienie łącznika międy bazą danych a resztą świata (aplikacje mobilne)

2014-11-18 Thread Sergiy Khohlov
Hello Robert, I would like to say django has all functionality for web development and C# is not needed. At first try to pass first 6 tutors. After this you can do start. Last one, speaking language in this maillist is English not Polish Many thanks, Serge +380 636150445 skype: skhohlov

Postawienie łącznika międy bazą danych a resztą świata (aplikacje mobilne)

2014-11-18 Thread Robert Ostrowski
Witam wszystkich, jestem kompletnie zielony jak chodzi o weba, tworzę aplikacje i gry na platformy mobilne (i nie tylko). Dostałem zlecenie na napisanie aplikacji wymagającej komunikacji z bazą danych. Wiem już że postawienie samej bazy danych jest dość proste (mySQL znam), wiem też że serwerem

Ovreeride django mptt admin queryset

2014-11-18 Thread Neeraj Sharma
Hi, I want to override django mptt admin queryset, i want to filter the the queryset. I also tried the following method in admin.py but its not working. def queryset(self, request): qs = super(DataField_NEWAdmin, self).queryset(request) return qs.filter(game_event__id=10)

override django mptt admin querset

2014-11-18 Thread Neeraj Sharma
Hi, I want to override django mptt admin queryset, i want to filter the the queryset. I also tried the following method in admin.py but its not working. def queryset(self, request): qs = super(DataField_NEWAdmin, self).queryset(request)

Configurable safety options for high performance Django systems

2014-11-18 Thread Rick van Hattem
Hi guys, As it is right now Django has the tendency to kill either your browser (if you're lucky) or the entire application server when confronted with a large database. For example, the admin always does counts for pagination and a count over a table with many rows (say, in the order of 100M)

Warning / Error when testing with W flag

2014-11-18 Thread Daniel Grace
Hi, I get another warning / error with a test command as follows: >python -W error manage.py test flow Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line File

Re: Uploadfile form and CSS Style

2014-11-18 Thread Kakar Nyori
Hello Russo, You need to select the input button in the css. Something like this: input[type=submit] { background-color: transparent; border:none; cursor:pointer; background-color:blue; color:white; } Note that this will select every "submit" type button in your html. So if you don't want all