--
Sincerely,
Pengfei Xue
已使用 Sparrow (http://www.sparrowmailapp.com/?sig)
已使用 Sparrow (http://www.sparrowmailapp.com/?sig)
在 2012年8月9日星期四,下午2:33,mapapage 写道:
> > I wrote this custom authentication backend:
>
> from django.contrib.auth.models import User, check_password
> from auth.model
>
> I'm working with a legacy database so I should use another model (Owners)
> instead of the default Djangoconstrib.auth.models.User for authentication.
>
That's why I wrote my own and custom authentication backend.
> My model has an id field (id = models.DecimalField(...)) that is used for
On Thursday, August 9, 2012 10:39:07 AM UTC+3, mapapage wrote:
>
> I'm working with a legacy database so I should use another model (Owners)
>> instead of the default Djangoconstrib.auth.models.User for
>> authentication.
>>
> That's why I wrote my own and custom authentication backend.
>
>>
http://www.djangobook.com/en/2.0/chapter14/
take a quick look at this article, i think it will help you out
--
Sincerely,
Pengfei Xue
已使用 Sparrow (http://www.sparrowmailapp.com/?sig)
已使用 Sparrow (http://www.sparrowmailapp.com/?sig)
在 2012年8月9日星期四,下午3:39,mapapage 写道:
>
>
> On Thursd
I saw it but I think that this isn't what I need for what I wanna do. I
shouldn't use django's authentication module. I should make my own backend
work.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
hello everyone,
am trying to build a single model that will be used for uploaded
images/files. Am trying to use it in the best way in the admin pages, so
when i associate it with a specific model as a many-to-many field it would
appear in a friendly way for users to upload images.
My attachment m
Hi,
Please tell me how can I know ,the details about user login and logout
details , and how can I store that data in DB in Django.
Thank You
Pervez
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us
What is the recommended best approach for using emails as usernames in
Django 1.4?
I've looked in the FAQ and couldn't find anything, I see there is this
issue https://code.djangoproject.com/ticket/3011 which is likely to be
addressed in 1.5 but I can't wait for 1.5. Searching here, stackoverfl
On Thu, Aug 9, 2012 at 1:19 PM, Pervez Mulla wrote:
> Please tell me how can I know ,the details about user login and logout
> details , and how can I store that data in DB in Django.
User model (auth.models.User) has last_login and if you need custom
data stored you can try using:
https://docs.d
I need to change what template to use in a response based on type of
user-agent in request. The middleware below works ok to detect mobile
client, but I cannot get the template manipulation in the process_view
method to work.
The middleware:
# Credits: http://djangosnippets.org/snippets/2001/
im
On Thu, Aug 9, 2012 at 4:49 PM, Pervez Mulla wrote:
> Hi,
>
> Please tell me how can I know ,the details about user login and logout
> details , and how can I store that data in DB in Django.
There are many registration modules already made in django, you just
download it and install to your syste
>
> On Thursday, 9 August 2012 13:18:36 UTC+1, MrMuffin wrote:
>>
>> I need to change what template to use in a response based on type of
>> user-agent in request. The middleware below works ok to detect mobile
>> client, but I cannot get the template manipulation in the process_view
>> method
Hmmm ... is there any other way to achieve the same result ( using a
special template for mobile devices ) without hacking this into each
view? MiddleWare using
https://docs.djangoproject.com/en/dev/topics/http/middleware/?from=olddocs/#process-template-response
for instance?
Anyway, thanks for
I'm using gunicorn and nginx on ubuntu when deploying my django
projects, but now I need to run a project on several platforms,
including windows. Is there a similar pure python configuration ( with
the expected reduced performance for serving static content )?
--
Mvh/Best regards,
Thomas Weholt
Thanks for the feedback guys..
What I ended up doing was adding the following lines to my models module:
from django.contrib.auth.models import User as BaseUser
BaseUser._meta.get_field("username")._unique = False
BaseUser._meta.get_field("email").null = True
Melvin: I tried your suggestion and
Hi folks, I am a little confused with the ordering of the post_syncdb
signal? (using 1.2.4)
Looking at the code in auth and contenttype, what makes
auth.permission so sure that the appropriate content type was created
before the necessary permission is created?
Similarly, I have another app calle
I saw this in one of the previous Python newsletters (I think) and it
looked pretty interesting: https://github.com/gregmuellegger/django-mobile
On Thu, Aug 9, 2012 at 9:29 AM, Thomas Weholt wrote:
> Hmmm ... is there any other way to achieve the same result ( using a
> special template for mobil
On Thu, Aug 9, 2012 at 3:33 PM, Dennis Lee Bieber wrote:
> On Thu, 9 Aug 2012 09:02:39 +1200, Lachlan Musicman
> declaimed the following in gmane.comp.python.django.user:
>>
>> From what I can see, the admin interface already keeps this data for
>> each object (exception: no create_date for data
I have a listview using the generic class based ListView. I have
get_queryset overloaded in my view:
class WebsiteList(ListView):
model = Website
def get_queryset(self):
return Website.objects.all()
First step is to add the tables2 mixin as follows:
class WebsiteList(tables.Sing
It sounds like you want to automagically do something like:
if request.is_mobile:
return render_to_response('test_mobile.html',{})
return render_to_response('test.html',{})
I'm not sure that will be possible without modifying your views. I did
something similar by determining which base templ
Hello all,
I am interested in making these two changes to Django: Setting APPEND_SLASH
= False and PREPEND_WWW = True.
The following links describe what each of these do but do not tell me
actually where these settings reside so that I can actually change them:
http://djangobook.com/en/2.0/cha
On Fri, Aug 10, 2012 at 10:41 AM, JJ Zolper wrote:
> Hello all,
>
> I am interested in making these two changes to Django: Setting APPEND_SLASH
> = False and PREPEND_WWW = True.
>
> The following links describe what each of these do but do not tell me
> actually where these settings reside so that
below is the logging config in setting.py. only the newest logs in the
output file.. It seems the log file is overwrite when new process been
forked
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(levelname)s
you are using TimedRotatingFileHandle, so it will rotate your log into a new
file with the name as xxx.20120810, and start store new entries in 'filename'(
stat.txt, error.txt)
--
Sincerely,
Pengfei Xue
已使用 Sparrow (http://www.sparrowmailapp.com/?sig)
已使用 Sparrow (http://www.sparrowmaila
24 matches
Mail list logo