Re: apps referencing username field in custom user classes

2013-06-23 Thread Victor Rajewski
Thanks Russ, This solves the problem from one end, however in my case the wrong end, as it would require the app I'm using (and presumably many other apps relying on the username field) to be re-written; besides which, USERNAME_FIELD is not present in the User model of django <= 1.4 so every

Re: How do I change a global setting from inside middleware?

2013-06-23 Thread Richard E. Cooke
Thanks Mr. Spaolonzi! I guess its time to read some template docs. I'll post back what I come up with so others can use it. Rich. On Sunday, June 23, 2013 3:20:24 PM UTC-4, Serge G. Spaolonzi wrote: > > Django settings cant be changed on the fly. > From the official documentation: > > You s

Question about python for web

2013-06-23 Thread Dat Huynh
Dear all, I have a very simple question about running a simple web application with apache on MacOS. Step 1: Copy the file mod_wsgi.so from the link http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-macosx106-ap22py26-3.3.so into the folder "/usr/libexec/apache2" Step 2: Add the f

Re: apps referencing username field in custom user classes

2013-06-23 Thread Russell Keith-Magee
On Mon, Jun 24, 2013 at 5:43 AM, Victor Rajewski wrote: > I have a custom minimal user model subclassing AbstractBaseUser, > containing little more than an email address, for use with > django-social-auth. However, I'm using an externally-developed app which > queries the user model using the user

Re: Have Jcrop in Django Admin for thumbnails?

2013-06-23 Thread Arkadiusz Tymieniecki
Hi Thomas, You can learn something from satchmo developers, they've implemented image_with_thumbnail field here: https://bitbucket.org/krizma/satchmo/src/7945ef742c82/satchmo/apps/satchmo_utils/thumbnail/field.py Cheers, Arkadiusz On 23/06/13 12:06, thoms wrote: > Hello, > > I'm new in th

apps referencing username field in custom user classes

2013-06-23 Thread Victor Rajewski
I have a custom minimal user model subclassing AbstractBaseUser, containing little more than an email address, for use with django-social-auth. However, I'm using an externally-developed app which queries the user model using the username field, which in my case does not exist, resulting in a F

How to use context_processors (part X)?

2013-06-23 Thread Floor Tile
*Sorry for multiple posts for the same subject!! I had some difficulties getting it right due to some stupidity on my side!* Hello everyone, I'm puzzling for some time now to get a solution for my following problem. I hope someone can help me. I need some context to be filtered before it's ren

How to use context_processors?

2013-06-23 Thread Mark van Deursen
Hello everyone, I'm puzzling for some time now to get a solution for my following problem. I hope someone can help me. I need some context to be filtered before it's rendered in a template. To do this I got the following piece of code saved in catalog_context_processors.py : from catalog.mode

Custom context_processors

2013-06-23 Thread Floor Tile
Hello everyone, I'm puzzling for some time now to get a solution for my following problem. I hope someone can help me. I need some context to be filtered before it's rendered in a template. To do this I got the following piece of code saved in catalog_context_processors.py : from catalog.models

Re: How do I change a global setting from inside middleware?

2013-06-23 Thread Serge G. Spaolonzi
Django settings cant be changed on the fly. >From the official documentation: > You shouldn’t alter settings in your applications at runtime. For example, don’t do this in a view: I think the solution for your problem is to set or update 'grappelli_admin_title' context variable from the middlewa

Re: 'FormSet' object has no attribute 'save'

2013-06-23 Thread Xavier Ordoquy
Hi, Looks like you've missed something in your code. Unfortunately without the formset creation / instance creation code, there isn't much we can do. Regards, Xavier. Le 23 juin 2013 à 17:05, Mário Idival a écrit : > Hi guys, > > I need of little help with formsets. I want save 3 instances o

How do I change a global setting from inside middleware?

2013-06-23 Thread Richard E. Cooke
I'm using Grappelli to spruce up my Admin interface. I would like to customize the site name (and web page tittle). I have this in my project settings.py file: # http://django-grappelli.readthedocs.org/en/latest/customization.html GRAPPELLI_ADMIN_TITLE = "The Default Company" And in my middle

Re: How to access request/session information from model.clean?

2013-06-23 Thread Richard E. Cooke
Thanks Jason! I hunted through your links, and while I was setting up a test I stumbled upon this in the Django 1.5 Admin docs: - https://docs.djangoproject.com/en/1.5/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model and this: - https://docs.djangoproject.com/en/1.5/ref/contri

Custom manytomany widget in admin site: How to get the objects instead of their keys?

2013-06-23 Thread Serge G. Spaolonzi
I have a custom m2m widget for the admin site. I need to display the names of the related objects but for the moment I only get the ids of the objects. Is it possible to get the related objects instead the keys? How is it implemented in the default widget and the horizontal_filter? (I took a look

Re: Background pattern files on S3 not being found while hosted on Heroku

2013-06-23 Thread Vincent Fulco
Should add running the normal django-storages, boto setup for serving static from S3. On Sunday, June 23, 2013 9:45:40 AM UTC-5, Vincent Fulco wrote: > > Verified S3 files are there and app on Heroku finds custom.css as other > bits come thru correctly. > > Within body{} of custom.css have tried

'FormSet' object has no attribute 'save'

2013-06-23 Thread Mário Idival
Hi guys, I need of little help with formsets. I want save 3 instances of an form in databases. E.G : name lastname - name lastname - name lastname - I try use formset but I'm not getting save, expected this error for me :' ClassNameForSet' object has no attribute 'save' Somebody know how i can

Background pattern files on S3 not being found while hosted on Heroku

2013-06-23 Thread Vincent Fulco
Verified S3 files are there and app on Heroku finds custom.css as other bits come thru correctly. Within body{} of custom.css have tried the following based on scouring the Net help sites (assume same for background:url and background-image:url): 1) url(img/backgrounds/foo.png) ref'ed to STAT

Re: How to divide my apps? Good practices?

2013-06-23 Thread galgal
I've made a quick schema of couple of main tables. As you can see, there are many relations, so I think putting it all in one app. There will be a couple of additional models. There will be 1 m

Re: Why is there no view for sign up in django.contrib.auth.views?

2013-06-23 Thread Raúl Pedro Santos
Russell, I disagree. You say that logging in has constant requirements but it doesn't. Some applications will require a username and a password, others will require an email address and a password, others will have some sort of captcha, others will have 2-factor authentication... So logging in

Have Jcrop in Django Admin for thumbnails?

2013-06-23 Thread thomaaaas
Hello, I'm new in the Django world, and I need some advice. Basically what I want: 1) In m model I have an origianl_image and a thumbnail_image 2) In the admin, a user upload an image 3) Then, we show him the Jcrop pluging to crop the image as a thubnail I already do 1) and 2), but have no id

Re: Deployment problem with google bots

2013-06-23 Thread Mike Dewhirst
On 22/06/2013 11:54pm, frocco wrote: Hello I get error messages from time to time because a google bot try's to view a product that no longer exists. How do I prevent this? Are you responding with the correct error message (probably 404) when someone looks for a non-existent page? -- You

Re: Django throws ImproperlyConfigured error when loading URLconf on startup

2013-06-23 Thread Pratik Mandrekar
Has anyone been able to resolve this? I am facing the same issue. On Sunday, March 24, 2013 8:46:26 PM UTC+5:30, Dan Gentry wrote: > > Andrei, I once received this error when the problem was actually in > another python module being imported - in my case views.py. Hope this > helps, Dan -- Y