Re: Problem Django Admin app is read only!

2013-06-06 Thread Enaut Waldmeier
Am Donnerstag, 6. Juni 2013 23:42:25 UTC+2 schrieb Frank Bieniek: > > Hi, > who is serving your media files? apache? > In debug mode django is not delivering them, if it is run through mod_wsgi > I know it is not about media files! The css aswell as the images are served correctly by apache.

Re: problem with logical and

2013-06-06 Thread Mike Dewhirst
On 7/06/2013 1:31pm, Mike Dewhirst wrote: I can't work this one out. I have a blind spot. Any help appreciated. Accidentally fixed this trying workarounds. Still not sure what was happening but I suspect I don't fully understand None in the boolean context. Anyway, I'm being more explicit now

Re: How send data to UpdateView from javascript. (Django 1.5)

2013-06-06 Thread Ariel V. R.
Code: HTML JS $('.icon-edit').click( function() { $object_id = $(this).parents().eq(0).attr('id'); $('#form-edit #input-pk').attr('value', $object_id); $('#form-edit').submit(); }) URL.PY ... url(r'^manage_p1/update/', MatterUpdat

How send data to UpdateView from javascript. (Django 1.5)

2013-06-06 Thread Ariel V. R.
Hello: Hello: I need to send data from html using javascript to UpdateView. Django sends me an error: "Generic detail view MatterUpdateView must be called with either an object pk or a slug." I think that the problem exists because the method as_view() does not receive the correct data. --

problem with logical and

2013-06-06 Thread Mike Dewhirst
I can't work this one out. I have a blind spot. Any help appreciated. My unit tests indicate a problem with the following method (is_current) on a model. Because I couldn't figure it out I instrumented with a whole mess of print statements. The problem occurs on the line with self.quality_tag.

Re: Cant get to admin login page

2013-06-06 Thread Gladson SimplĂ­cio Brito
you forgot: https://docs.djangoproject.com/en/dev/intro/tutorial01/#database-setup configs in settgins.py manage.py syncdb 2013/6/6 Rebecca > I'm on part 2 of the django book tutorial ( > https://docs.djangoproject.com/en/dev/intro/tutorial02/) and am trying to > get onto the admin login page

Re: Cant get to admin login page

2013-06-06 Thread Nikolas Stevenson-Molnar
And also did you uncomment the appropriate lines to enable the admin app? https://docs.djangoproject.com/en/1.5/intro/tutorial01/#activating-models _Nik On 6/6/2013 2:53 PM, Rebecca wrote: > I'm on part 2 of the django book tutorial > (https://docs.djangoproject.com/en/dev/intro/tutorial02/) and

Re: Cant get to admin login page

2013-06-06 Thread Nikolas Stevenson-Molnar
Did you configure your database in settings.py as described in part 1? _Nik On 6/6/2013 2:53 PM, Rebecca wrote: > I'm on part 2 of the django book tutorial > (https://docs.djangoproject.com/en/dev/intro/tutorial02/) and am > trying to get onto the admin login page in my browser. When I go to > t

Cant get to admin login page

2013-06-06 Thread Rebecca
I'm on part 2 of the django book tutorial ( https://docs.djangoproject.com/en/dev/intro/tutorial02/) and am trying to get onto the admin login page in my browser. When I go to the admin site on my local domain (http://127.0.0.1:8000/admin/), I dont get to the login screen. I get to something e

Re: Understanding an existing big web application written in Django

2013-06-06 Thread Dow Street
I also find it helpful to generate a diagram of the model relationships - e.g. using graph_models in django-extensions: http://pythonhosted.org/django-extensions/ On Jun 6, 2013, at 7:06 AM, si wrote: > I have already existing web application code written by a someone else now I > need

Re: Problem Django Admin app is read only!

2013-06-06 Thread Frank Bieniek
Hi, who is serving your media files? apache? In debug mode django is not delivering them, if it is run through mod_wsgi Greets from Ratingen Frank Am 06.06.13 17:08, schrieb Enaut Waldmeier: Hi, I have a problem with django-admin whenever I deploy my page to the apache server with DEBUG=Fals

Re: Understanding an existing big web application written in Django

2013-06-06 Thread Javier Guerra Giraldez
On Thu, Jun 6, 2013 at 6:46 PM, Sam Walters wrote: > find . -name '*.py' -exec grep -E -H -n 'import LocationAirfieldLookup' '{}' > \; -print far faster and better use of grep's capabilities: grep -n 'import LocationAirfieldLookup' -R . --include '*.py' -- Javier -- You received this messa

Re: Understanding an existing big web application written in Django

2013-06-06 Thread Sam Walters
Hi In addition to what has already been said. Make use of command line search tools. Hoe to search through all the python files using BASH is a good example. eg: In one of my projects i have to find all the places where a particular class is called or instantiated: 'LocationAirfieldLookup' find

Re: django1.5 - url resolver vs i18n_patterns : wrong behaviour

2013-06-06 Thread Ivan Tatarchuk
Not shure if I understand you correctly, but if I use static linking all works fine. Problem appears only with dynamic linking(like in admin templates). Is this a feature or a kind of bug? really want to use django's i18n_patterns in my project, but can't understand how to escape from this case.

Some problems with Paginator

2013-06-06 Thread Federico Erbea
I'm new in python and django, so i'm sorry for the stupid question...:) This is in views.py def attore(request, id): attore = get_object_or_404( Attore, pk=id ) # return render_to_response('Attore.html', { 'film': Film.objects.filter( attori=attore ), 'attore': attore }) film_attor

Problem Django Admin app is read only!

2013-06-06 Thread Enaut Waldmeier
Hi, I have a problem with django-admin whenever I deploy my page to the apache server with DEBUG=False django-admin displys all the entries of this app as if they had `has_change_permission(): return false`. I can't find any errors and it only happens on apache. what works and what does not:

Re: django's database system

2013-06-06 Thread Vernon D. Cole
You can write a "django management command" which runs on a workstation. https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ I use this a lot for command-line operation to do batch processing kinds of things. Since "django is just Python", there is nothing to prevent you fro

Re: Understanding an existing big web application written in Django

2013-06-06 Thread sidddd
I have already existing web application code written by a someone else now I need to work on it. So I am trying to understand the architecture of the various classes and interaction. I want to know where jump in and how to understand the architecture of the code. Urls.py seems to be a good place

Re: Understanding an existing big web application written in Django

2013-06-06 Thread sidddd
Thank you for the blog it is helpful. On Wednesday, 5 June 2013 22:17:45 UTC-4, Siddharth Shah wrote: > > I think you can definitely learn from: > http://dangoldin.com/2013/05/07/eighteen-months-of-django/. > > Lots of pointers and tips. My suggestion would be pick up a popular site > Hacker New

Re: django's database system

2013-06-06 Thread Amirouche Boubekki
peewee looks more like django ORM 2013/6/5 Nikolas Stevenson-Molnar > Have you had a look at SQLAlchemy? http://www.sqlalchemy.org/ > > _Nik > > On 6/5/2013 3:29 AM, heni yemun wrote: > > Hi, > > I'm starting to develop some python program to address some da

Re: getting information from a many to many model from user

2013-06-06 Thread Daniel Roseman
On Thursday, 6 June 2013 11:00:40 UTC+1, tony gair wrote: > > > > I use the Userena app to manage my users but I want the superuser to > choose the organisation for them so they cannot wonder around other > organisations information. > > I can either create a foreign key in their profile to poin

Re: Is there any good tutorial on how to daemonize celery?

2013-06-06 Thread Michael Thon
> CELERY_RESULT_BACKEND = "database" > CELERY_RESULT_DBURI = > "postgresql://"+get_env_setting('DB_USER')+":"+get_env_setting('DB_PASSWD')+"@localhost/"+get_env_setting('DB_NAME') > > Now I tried to run it with this manage.py command > > python manage.py celery worker --app=project.settings.pr

Re: A ready made python/django validation class

2013-06-06 Thread Daniel Roseman
On Thursday, 6 June 2013 12:08:14 UTC+1, niiati wrote: > Hello Snr Python/Django programmers, > > I am very new to python/Django and I find writing validation classes for > my application very tedious and repetitive. I am wondering if there is a > ready made class for validation. I mean validati

A ready made python/django validation class

2013-06-06 Thread niiati
Hello Snr Python/Django programmers, I am very new to python/Django and I find writing validation classes for my application very tedious and repetitive. I am wondering if there is a ready made class for validation. I mean validating things like date, integers, address, currency and stuff like

Re: Django foreing keys joins

2013-06-06 Thread Jani Tiainen
That is how Django works. So as you see, django makes query where it compares _joined_ table id as a null. To make it happen (left outer) join must happen, otherwise it wouldn't return any rows. I agree that Django _could_ do a better and optimize query so that it would query instead of under

Re: Is there any good tutorial on how to daemonize celery?

2013-06-06 Thread manuga...@gmail.com
Mike, Thanks for the last reply! That gives some clarity. So I put the following settings in my settings file. _ BROKER_URL = "amqp://:@localhost:5672/" CELERY_RESULT_BACKEND = "database" CELERY_RESULT_DBURI = "postg

getting information from a many to many model from user

2013-06-06 Thread tony gair
I use the Userena app to manage my users but I want the superuser to choose the organisation for them so they cannot wonder around other organisations information. I can either create a foreign key in their profile to point to the organisation but then I expect they can change it, which woul