Re: django.contrib.auth doesn't support template context processors?

2015-01-20 Thread James Schneider
The FBV's included in contrib.auth.views don't use RequestContext(), they jump straight to TemplateResponse(): https://github.com/django/django/blob/master/django/contrib/auth/views.py#L192 IIRC, rendering a context via a RequestContext() is what triggers the TEMPLATE_CONTEXT_PROCESSORS to run.

Re: Map Django Model to Legacy multi-join query

2015-01-20 Thread James Schneider
Not sure what you mean. Are you looking to build the model definitions in your models.py files, or are you trying to take the results of a query against MSSQL and pass them to a constructor for a model that has already been defined? Either way, eventually you'll end up with a copy of the 'model'

Re: Help a newb with authentication and registration

2015-01-20 Thread Ben Gorman
@Collin Thanks a ton! -- 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, send email to

Re: Authentication when usernames are not unique

2015-01-20 Thread James Schneider
Wow, nice. You are probably right in not inheriting from PermissionMixin and AbstractBaseUser and just re-implementing the needed functionality. I ended up doing the same thing for my custom user and auth backend as well. Not as convenient, but hey, it works right? ;-) Bravo. -James On Jan 20,

Re: Authentication when usernames are not unique

2015-01-20 Thread Erik Cederstrand
Ok, here's a stripped-down solution. I ended up creating a new SchoolUser user model with a OneToOne relation to my LegacyUser, to keep the LegacyUser model uncluttered. The SchoolUser implements all methods from AbstractBaseUser and PermissionsMixin but doesn't inherit from them, because I

Re: Is Django suitable for this purpose?

2015-01-20 Thread Cal Leeming
On Tue, Jan 20, 2015 at 10:43 PM, Avraham Serour wrote: > I'm not sure what kind of answers you expect by asking if django is the > best tool on a django forum... > Actually, OP should expect impartial advice on suitability, as list membership does not automatically mean

Re: Is Django suitable for this purpose?

2015-01-20 Thread Avraham Serour
I'm not sure what kind of answers you expect by asking if django is the best tool on a django forum... In any case, of course it is possible to do this in django, it all depends on you, django is just a framework but you still need to connect the dots the time lag would only depend on how you

Is Django suitable for this purpose?

2015-01-20 Thread Mike Taylor
I want to have an appointment booking option built into a website for a clinic. The feature needs to integrate with the software that runs their office ( http://www.atlaschirosys.com/) In order to be fully useful, it would need to be virtually instantaneous in filling the requested

Re: Re-Order rendering of input fields of django-contact-form?

2015-01-20 Thread Paul Royik
Try def __init__(self, *args, **kwargs): super(CustomContactForm, self).__init__(*args, **kwargs) self.fields.keyOrder = ['name', 'reason', 'email', 'body'] On Tuesday, January 20, 2015 at 11:26:01 PM UTC+2, Tobias Dacoir wrote: > > I'm using django-contact-form which allows me

Re: Installing south and using sqlite3's :memory: ruins total test suite time

2015-01-20 Thread Peter Bengtsson
It seems, for some reason settings.COMPRESS_ENABLED gets set to False when south is installed. On Tuesday, January 20, 2015 at 12:37:44 PM UTC-8, Peter Bengtsson wrote: > > I have a django project on django 1.6. It's using django-nose and it's > using sqlite3's :memory: trick: > > DATABASES =

Re-Order rendering of input fields of django-contact-form?

2015-01-20 Thread Tobias Dacoir
I'm using django-contact-form which allows me to subclass it and add custom fields to it. However all my added fields will appear at the bottom. I even tried overwriting the original fields but still the order they appear is wrong. How can I control this? I tried searching for an answer, but

Re: Installing south and using sqlite3's :memory: ruins total test suite time

2015-01-20 Thread Peter Bengtsson
Quick update there, I've figured out where the time is spent. Those ~45 seconds is caused by django_compressor calling out to `lessc` to convert .less files to .css. I'm now trying to figure out why having south in INSTALLED_APPS changes whether that gets run or not. It shouldn't run anything

Installing south and using sqlite3's :memory: ruins total test suite time

2015-01-20 Thread Peter Bengtsson
I have a django project on django 1.6. It's using django-nose and it's using sqlite3's :memory: trick: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } Before I added `south` to INSTALLED_APPS it would take about ~5 seconds to

Map Django Model to Legacy multi-join query

2015-01-20 Thread Fred
I've got a complex 1000+ table vendor read-only MS SqlServer database and only have SELECT privileges. I can connect with pymssql no problem. Of all these tables, I probably care about 50 or less. I cannot create views unless I introduce another physical server and use the "Linked Server"

Re: django.contrib.auth doesn't support template context processors?

2015-01-20 Thread Mark Rogaski
And looking at the request using django-debug-toolbar, I confirmed that none of the context processors were applied to the templates. On Tuesday, January 20, 2015 at 8:26:22 AM UTC-5, Mark Rogaski wrote: > > Yes, I've appended it to the defaults. > > TEMPLATE_CONTEXT_PROCESSORS += ( ' >

Binding model data to a formset without POST

2015-01-20 Thread Rob Groves
Hi All, I am new to Django and am enjoying it very much. Excellent documentation, tutorials, and general environment to work in. Good job Django developers! I have a question on binding data to a ModelFormset. I have looked extensively and not seen this particular issue covered before. I

Re: django.contrib.auth doesn't support template context processors?

2015-01-20 Thread Mark Rogaski
Yes, I've appended it to the defaults. TEMPLATE_CONTEXT_PROCESSORS += ( ' django.core.context_processors.request', ) On Tuesday, January 20, 2015 at 7:43:54 AM UTC-5, Edgar Gabaldi wrote: > > did you register the context processor in settings? > > On Tue, Jan 20, 2015 at 3:32 AM, Mark

OneToOne field versus model inheritance

2015-01-20 Thread Paul Royik
I have three models: Person, Client, Member Person is a base model, Client and Member are profiles for Person. class Person(AbstractBaseUser, PermissionsMixin): email = models.EmailField( verbose_name=_('email address'), max_length=255, unique=True, ) class

Re: django.contrib.auth doesn't support template context processors?

2015-01-20 Thread Edgar Gabaldi
did you register the context processor in settings? On Tue, Jan 20, 2015 at 3:32 AM, Mark Rogaski wrote: > Hello, > > I'm coming back to Django after working with 1.4/1.5. Within a custom > template for auth.views.password_reset, I'd like to access the request > data using

Re: block php requests

2015-01-20 Thread Avraham Serour
you can tell apache to get any request ending with .php and return 404 from apache without passing the request to django you could return something else like 403 and ban the ip for some time On Tue, Jan 20, 2015 at 1:55 PM, hinnack wrote: > Hi, > > I get a lot of

Why this code does not change users firstname and lastname?

2015-01-20 Thread Jayadeep Karnati
Looks like you really want to stick with normal forms. I see there is nothing wrong with the code you've posted. Can you also post the snippets of AdditionalCandidateInfo() and your template. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

django.contrib.auth doesn't support template context processors?

2015-01-20 Thread Mark Rogaski
Hello, I'm coming back to Django after working with 1.4/1.5. Within a custom template for auth.views.password_reset, I'd like to access the request data using django.core.context_processors.request. But it doesn't look like any template context processors are applied. It's not a big problem

block php requests

2015-01-20 Thread hinnack
Hi, I get a lot of intrusion checks on my website - especially for PHP (wordpress, joomla, …). Today they all raise a 404 errors in python-django - so if you have emails enabled for 404 errors… What is the best way to block those requests in a standard apache deployment? (

Re: How to check appname via Django commands?

2015-01-20 Thread Sugita Shinsuke
Hello Vijay Thank you for replying. But, I want to know the project name of django not app name. 2015年1月17日土曜日 23時18分46秒 UTC+9 Vijay Khemlani: > > What problem are you having exactly? > > Also I'm not sure what do you mean by "hierarchy" of the project folders, > do you mean the order the

Re: Why this code does not change users firstname and lastname?

2015-01-20 Thread Daniel Roseman
On Monday, 19 January 2015 12:39:38 UTC, joulumaa wrote: > > Why would it make sense to switch from different form type? > I use below form to get information that I like to save to user database? > Part of information I need ot update goes to Additional user info class, I > would like to stay in

Re: Any reliable django stripe payments library

2015-01-20 Thread Daniel Roseman
On Tuesday, 20 January 2015 04:39:47 UTC, Chen Xu wrote: > > Hi Everyone, > Is there any reliable django stripe payments library that does not require > to run a python manage.py syncdb? The reason I am asking is I am uaing > SQLAlchemy instead of its builtin ORM. > > Thanks > You don't need a