The better approach would be to specify a custom form in your
ModelAdmin. This way your fieldset definition could include anything
that's specified in your custom form.
For Example:
class SampleModel(models.Model):
email = models.EmailField...
firstname = models.CharField...
class Sampl
).__init__(self, *args, **kwargs)
...
self.fields['lastname'].initial = ...
On Jan 8, 3:14 am, Andy wrote:
> The better approach would be to specify a custom form in your
> ModelAdmin. This way your fieldset definition could include anything
> that's speci
On Jul 24, 4:39 pm, James Bennett wrote:
> Except this is what it turns into. So suppose a patch is added which
> does nothing except keep the database connection open; well, that's
> problematic because it means a server process/thread that's not
> handling a request at the moment is still tying
On Jul 23, 10:50 pm, Glenn Maynard wrote:
> In this case, that's a terrible-performance-by-default approach.
> (It's also not a default, but the only behavior, but I'll probably
> submit a patch to add a setting for this if I don't hit any major
> problems.)
Agreed.
Please share any patches you
On Jul 24, 8:54 pm, Alex Gaynor wrote:
> "Seen under this light, the additional 150ms latency resulting from non-
> persistent DB connection is huge - it implies almost 30% fewer
> customer orders. And it has nothing to do with traffic."
>
> I'd just like to take a moment to point out that that s
Tim,
Thanks for the helpful answers.
As for specific details about my app, right now I'm still in the
design phase. It will start small, but hopefully it will get popular
quickly. So I don't know how big the Db will be or how many users will
there be.
What I'm trying to do is to make sure there
Great. Thanks.
On Apr 19, 7:59 am, Alex Koshelev wrote:
> There is an existing production-ready application [1] that allows you
> to use MySQL replication facilities. It is formed as django database
> backend with some additional functional.
>
> We use it for our high-load Django powered content
field
property.
(so still a hack!)
Andy
On May 7, 10:01 am, PierreR wrote:
> Thanks for your reply.
>
> My intention is to use this field as a version/timestamp to implement
> a form of optimistic locking. I need to receive it back from the user
> through a form and check it against
On May 24, 9:54 pm, Brian Neal wrote:
> On May 24, 6:50 pm, Continuation wrote:
>
> > For example, I have a view edit_profile that edits a user's profile.
> > Obviously I want to make sure that each user can edit his own profile
> > only.
>
> > So before the profile of user A is being edited b
Hello,
I am new to Django and Python but am determined to learn. I am
creating a page that asks for some user input. My model looks like
this:
from django.db import models
from django.forms import ModelForm
floor_plan_choices = (
('A', 'Square'),
('B', 'Rectangular'),
Thanks Kenneth. I'll check out the link and use better subject lines
in the future...unless you want to send a donation!
On May 30, 1:38 am, Kenneth Gonsalves wrote:
> On Saturday 30 May 2009 12:47:27 Andy wrote:
>
> > I would like to set the order_number in my model t
I have a form with an email field and email confirmation field. I
want to check the form input to make sure the two fields match. So
far I can get the error message 'Email addresses do not match.' to
display, but if they do match I am getting an error 'InterfaceError
at /order/
Error binding para
I should say that I am using Django 1.1.1, Python 2.5 and sqlite3.
Thanks for your help.
On Nov 15, 9:29 am, Andy wrote:
> I have a form with an email field and email confirmation field. I
> want to check the form input to make sure the two fields match. So
> far I can get the erro
Thank you all for your replies. Karen, both good points. pjrharley,
I agree with Dennis. If the user is required to re-type their email
address, then that in combination with Django's simple built in email
validation should be sufficient.
I am using a ModelForms right now. If I remove email_co
I have a model named Articles with title and content fields. Each
page of my site should display a list of the titles, linked with
anchor tags to the corresponding area of the Resources page which
displays all the titles and content. I am having trouble figuring out
how to pass the #title info.
Hmm, still not clear. My url is simply this:
(r'^resources/$', views.resources)
I have read that I need to use HttpResponseRedirect to make use of
#anchor tags. Is this not the case?
Thanks for your help!
On Nov 29, 8:38 am, rebus_ wrote:
> 2009/11/29 Andy :
>
>
>
Fantastic! I think I was overthinking my problem. Thanks a lot!
On Nov 29, 10:36 am, rebus_ wrote:
> BTW here is an example:
>
> When you click this
> link:http://en.wikipedia.org/wiki/Fragment_identifier#Processing
>
> your browser will open uphttp://en.wikipedia.org/wiki/Fragment_identifierp
This is a very beginner question:
Say a user has just filled out a form and hit the submit button. They
are redirected to an order confirmation page. How can I retrieve the
one row of data the user just submitted and display it on the order
confirmation page?
Here is my simple View so far, but
Thanks for the response Shawn. I have done what you suggested,
assigning a variable named order_info and can use it if I use
render_to_response in my order view. But I want to use
HttpResponseRedirect after the form is saved. I'm thinking I need to
get the order_info variable into my order_compl
.html', order_info,
articles)
On Dec 11, 9:30 am, Daniel Roseman wrote:
> On Dec 11, 3:13 pm, Andy wrote:
>
>
>
>
>
> > Thanks for the response Shawn. I have done what you suggested,
> > assigning a variable named order_info and can use it if I use
> > ren
Tom - DR's method is simple and effective, but I'm guessing you say
it's the worst way because it creates an unnecessary database
request. Is this a correct assumption? If not, please explain.
On Dec 11, 10:58 am, Tom Evans wrote:
> On Fri, Dec 11, 2009 at 4:44 PM, Andy wr
What is the best way to implement horizontal database sharding through
Django?
For example, say I have a class Note. I want to shard the database
table Note into N shards based on the Note author's id - author.id % N
1) Should I shard the class Note into N corresponding classes - Note0,
Note1, No
I have N models that are identical except the model names (i.e. they
all have the same attributes, methods):
MyModel0, MyModel1, MyModel2, ...
Normally I'd need to type out the model definitions for those N models
by hand inside models.py.
Is there a way to generate the N model definitions progr
>
> I'm not completely sure what you're trying to do, but I have a blog
> entry on creating temporary models programmatically - it might help
> you:http://blog.roseman.org.uk/2010/04/13/temporary-models-django/
What I'm trying to do is to shard my database horizontally.
For example say I have a m
>
> Why not use the facilities for sharding that are built in?
>
> Database routers [1] are designed to allow you to have a single model
> definition, but decide which database connection is used at runtime
> based on properties of the objects involved.
>
> [1]http://docs.djangoproject.com/en/dev/t
I'd stay away from Amazon if like you said money is a concern.
Amazon web services are extremely overpriced. For the same amount of
money you'd be able to get much better performance by renting a
dedicated server or even a VPS.
Also if you're running databases then IO performance is critical. The
I'm trying to shard my database horizontally.
In another thread (http://groups.google.com/group/django-users/
browse_thread/thread/2748cdf205b5cf3e/
e8fe5087748d3c43#e8fe5087748d3c43) I was told it's best to use the
Database Router to implement horizontal sharding.
But I can't figure out how to u
> Ah - this is possibly the source of confusion. Django's Routers can
> shard to different databases, but not to different tables in the same
> database.
>
> Why do you want to shard into different *tables*? The usual
> interpretation of sharding (at least, the usual interpretation that
> *I'm* fa
> The db_for_read() and db_for_write() methods accept a model, and
> usually a hint. If provided, the hint will be the instance the
> database operation is acting on (or an instance related to the
> operation). These methods return the alias of the database that should
> be used to perform the rea
I have an application that's similar to the typical Q&A system.
A user asks a question. other users submit answers to that question:
- Each user is allowed to submit up to N answers to each question,
where N > 1 (so, say each user can submit no more than 3 answers to
each question)
- A user can e
When I create an object in Django, how long does it live?
When Django finishes responding to a HTTP request, the Python process
lives on to serve the next request. Does that mean all those objects
that were created would continue to hang around?
--
You received this message because you are subsc
I have a Django application.
One of my models looks like this:
class MyModel(models.Model):
def house_cleaning(self):
// cleaning up data of the model instance
Every time when I update an instance of MyModel, I'd need to clean up
the data N days later. So I'd like to schedul
I have a model Tweet that I'd like to shard horizontally based on the
tweet author's id.
class Tweet(models.Model):
author_id = models.IntegreField()
text = models.TextField()
Let's say I set up 3 databases: shard0, shard1, shard2
I'd like to take the tweet author's id, do a modulo 3 an
On Aug 19, 9:28 am, Russell Keith-Magee
wrote:
> You've got the right idea, but the implementation you provide probably
> won't be comprehensive enough in practice. The hint is any extra
> information that will help you determine the right database to use;
> there's no guarantee that the insta
On Aug 19, 9:03 pm, Russell Keith-Magee
wrote:
> As for the instance not existing: Consider the following queries:
>
> MyModel.objects.filter(foo=bar)
>
> or
>
> MyModel.objects.update(foo=bar)
>
> These are read and write queries respectively, but neither has any
> meaningful concept of a curr
On Aug 20, 10:04 pm, Russell Keith-Magee
wrote:
>Of course, given that you know your sharding scheme, you could use the
>router directly.
>
>Tweet.objects.using(router.db_for_read(Tweet, author=a)).filter(author_id=a)
Ah Thanks. This is what I need.
> You won't get any argument from me. What's
I'd like to detect the location of each user and then set the default
language and location for him accordingly. The homepage would also be
tailored to each location (country and city).
Can anyone share information on how to do that with Django?
--
You received this message because you are subsc
In this presentation save() is described as not thread-safe and
update() is recommended to be used instead of save():
http://www.slideshare.net/zeeg/db-tips-tricks-django-meetup (page
2, 3, 4)
Is it true that save() is not thread-safe? How is it not? Should I
avoid using save() and use updat
I know I can store simple key/value pairs to session. Is it possible
to store entire objects to session?
I want to enable un-logged-in users to submit form data. After the
form is submitted, I want to store the form data in session and then
redirect the user to sign-in. After they sign in, I'd ret
Pete,
Would you recommend PyMySQL for production use?
Which parts of Django do I need to modify in order to use it with
PyMySQL instead of MySQLdb?
Thanks.
On Sep 3, 2:07 pm, Pete Hunt wrote:
> I’m proud to announce the release of PyMySQL 0.3. For those of you
> unfamiliar with PyMySQL, it is
I'm working on a Django-based site that consists mostly of user-
generated content: reviews, comments, tweet_like posts, etc.
I'm concerned about spam. Are there any spam filters available for
Django? If not, what types of algorithm can be used for spam
filtering?
On a more general note, does any
c spam filtering or flagging in
addition to the logged-in requrement.
On Sep 4, 1:10 am, Kenneth Gonsalves wrote:
> On Fri, 2010-09-03 at 21:56 -0700, Andy wrote:
> > I'm working on a Django-based site that consists mostly of user-
> > generated content: reviews, comments,
What are the downsides of just importing & using SQLAlchemy (which
supports composite PK) in a Django program?
On Sep 3, 10:43 pm, Russell Keith-Magee
wrote:
> On Sat, Sep 4, 2010 at 7:17 AM, Brendon wrote:
> > I have a project where we have an existing database which uses
> > composite (multipl
ant to drop by:
http://groups.google.com/group/gevent/browse_thread/thread/b5f7bf44b7690ed9
On Sep 4, 4:58 pm, Pete Hunt wrote:
> Hi Andy -
>
> Below is a patch that will let Django use pymysql if MySQLdb is not
> available. Currently it is not in use in production anywhere but I
On Sep 5, 5:29 am, Daniel Roseman wrote:
> If I get some time I'll try and work up an example.
Please do Daniel. That'd really help.
--
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...@googlegro
Anyone tried running Django with PyPy JIT?
What are the steps to set it up? Is it stable?
PyPy benchmark shows almost 3X speed up of Django and they also said
it would reduce memory consumption. I'm interested in trying it out.
Just want to learn about anyone's experience with running Django on
P
I have a model MyModel that has a field expiration_datetime.
Every time a user retrieves an instance of MyModel I need to first
check if it has expired or not. If it has expired, than I need to
increment some counter, update others, and then reset the
expiration_datetime to some time in the future
How do I freeze a row in database?
On Sep 6, 11:05 am, Jim wrote:
> Maybe I'm not understanding the question but I'd freeze the row in the
> database, do the work, and then unfreeze the row.
>
> Jim
--
You received this message because you are subscribed to the Google Groups
"Django users" gro
Thanks Alex,
Is there any instructions on how to set up django with PyPy you could
point me to?
Andy
On Sep 5, 7:50 pm, Alex_Gaynor wrote:
> On Sep 5, 4:40 pm, Andy wrote:
>
> > Anyone tried running Django with PyPy JIT?
>
> > What are the steps to set it up? Is
On Sep 10, 11:18 am, Andy Dustman wrote:
> Uh, no.
>
> MySQLdb releases the GIL on any blocking call, so other threads can run.
>
> Django is *not* asynchronous. It's threaded.
The default Django behavior is threaded.
But it can be made to run in async mode, where socket c
I have a model FieldReport that has, among other fields, these two
fields:
-country
-city
Both "country" and "city" are lists of choices.
I want to have a form FieldReportForm as a ModelfForm based on the
model FieldReport. I want to have "country" and "city" represented as
drop down lists. More
db()
> +except ImportError:
> + pass
> +
>
> On Sep 10, 12:25 pm, Andy wrote:
>
> > On Sep 10, 11:18 am, Andy Dustman wrote:
>
> > > Uh, no.
>
> > > MySQLdb releases the GIL on any blocking call, so other threads can run.
>
> > > Djan
According to documentation (http://docs.djangoproject.com/en/dev/
topics/auth/), models.User contains:
first_name
Optional. 30 characters or fewer.
last_name
Optional. 30 characters or fewer.
email
Optional. E-mail address.
Are "first_name" & "last_name" limited to alphanumeric charac
On Oct 2, 1:45 am, Torsten Bronger
wrote:
Thanks for responding.
> Hallöchen!
>
> > Are "first_name" & "last_name" limited to alphanumeric characters
> > or can they contain non-English characters like "ü" or
> > non-European characters like "黒"?
>
> Yes.
"Yes" is in "first_name" & "last_name"
On Oct 2, 3:27 am, Torsten Bronger
wrote:
> Hallöchen!
>
> Andy writes:
> > On Oct 2, 1:45 am, Torsten Bronger
> > wrote:
>
> > Thanks for responding.
>
> >>> Are "first_name" & "last_name" limited to alphanumeric
> >>
I need to model many different product categories such as TV, laptops,
women's apparel, men's shoes, etc.
Since different product categories have different product attributes,
each category has its own separate Model: TV, Laptop, WomensApparel,
MensShoes, etc.
And for each Model I created a Model
>>> from django.contrib.sessions.backends.db import SessionStore
>>> s = SessionStore(session_key='2b1189a188b44ad18c35e113ac6ceead')
>>> s['last_login'] = datetime.datetime(2005, 8, 20, 13, 35, 10)
>>> s['last_login']
datetime.datetime(2005, 8, 20, 13, 35, 0)
>>> s.save()
The above shows how to u
A few questions about Django's authentication system:
- Once a user is logged in, how long does he remain logged in? Is
there any way to configure this - e.g. "users will remain logged in
for 24 hours"?
- Once a user provided a matching username & password and is
authenticated, then what? In subs
I recently tried to send the following in a test password email from a
site I am creating:
This is a test reset password email.
However when I received the email it displayed the "This is a test
reset password email.".
My question is how can I send a styled email using html tags and
possibly eve
This isn't directly related to your question, but mod_python is not a
recommended method of deploying Django. Support for it will be
deprecated. You might want to check out mod_wsgi.
On Nov 1, 5:15 pm, The End wrote:
> I've finally got mod_python and mysqldb working with apache (long
> story shor
On Nov 2, 4:50 am, Tom Evans wrote:
> On Tue, Nov 2, 2010 at 9:07 AM, andy wrote:
> > I recently tried to send the following in a test password email from a
> > site I am creating:
>
> > This is a test reset password email.
>
> > However when I received the
On Nov 2, 4:50 am, Tom Evans wrote:
> On Tue, Nov 2, 2010 at 9:07 AM, andy wrote:
> > I recently tried to send the following in a test password email from a
> > site I am creating:
>
> > This is a test reset password email.
>
> > However when I received the
On Nov 2, 4:50 am, Tom Evans wrote:
> On Tue, Nov 2, 2010 at 9:07 AM, andy wrote:
> > I recently tried to send the following in a test password email from a
> > site I am creating:
>
> > This is a test reset password email.
>
> > However when I received the
On Nov 2, 4:50 am, Tom Evans wrote:
> On Tue, Nov 2, 2010 at 9:07 AM, andy wrote:
> > I recently tried to send the following in a test password email from a
> > site I am creating:
>
> > This is a test reset password email.
>
> > However when I received the
Hi guys,
Say I have a CUSTOMER, BRANCH and a SALES table for my project design.
Question, should is it wise to create a customer, branch and sales
app. I like this idea of doing this but I have a few issues.
1. If I create a customer app and create a Customer model class that
has a ForeignKey re
he flexibility to link up the same
> customer to many branches.
>
> On Nov 4, 6:24 pm, andy wrote:
>
> > Hi guys,
>
> > Say I have a CUSTOMER, BRANCH and a SALES table for my project design.
>
> > Question, should is it wise to create a customer, branch and sale
I have a Q&A type of site with the following models:
class Question(models.Model):
title = models.CharField(max_length=70)
details = models.TextField()
class Answer(models.Model):
question_id = IntegerField()
details = models.TextField()
I need to display a specific question toge
Django recommends saving images to the file system since this gives
better performance than storing the files in a database. However I
don't seen any documentation on how to restrict access to those files
by user. If someone knows the url to your image directory they could
possibly view all the con
Thanks for the info very useful.
On Nov 10, 6:34 pm, Łukasz Rekucki wrote:
> On 11 November 2010 03:19, andy wrote:
>
> > Django recommends saving images to the file system since this gives
> > better performance than storing the files in a database. However I
> > don&
you might also want to take a look at this "Remember me for login"
snippet from django snippets
http://djangosnippets.org/snippets/1881/
On Nov 27, 6:00 am, robos85 wrote:
> request.session.set_expiry() it's ideal for me:)
>
> On 27 Lis, 02:01, Addy Yeow wrote:
>
> > i use thishttp://djangosnip
Well you don't have to make the foreign key field required, that way
comments belonging to guest users can have a blank foreign key
Possibly you could also create a default guest user that is assign to
comments made by guest users. I generally having my application
depending on the creation of som
So I was having a bit of confusion over the method that django uses to
protect passwords. The issues I had was that It seen unsecured to have
the salt publicly available in the database since anyone who gets hold
of the database would know the salt. After rereading the django book
and doing some ad
Generally when I get an error similar to that(not necessarily when
using django) It means that I have violated some field that has a
unique constraint. Look in you database and see if you have a
constrain on that table.
On Dec 6, 2:55 pm, jc wrote:
> I'm migrating my Django database from sqlite t
>From the django doc "Due to the way GenericForeignKey is implemented,
you cannot use such fields directly with filters (filter() and
exclude(), for example) via the database API. They aren't normal field
objects."
http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#generic-relations
O
Well django has a ISNULL which I guess could be use to get the result
that you want. I'm a bit new to django and have not done any many-to-
many relationships as yeah but I'm guessing you could do something
like this:
Lest say table A = Blog, B = entry and C = blogentry
Blog.objects.filter(entry_
Well django has a ISNULL which I guess could be use to get the result
that you want. I'm a bit new to django and have not done any many-to-
many relationships as yeah but I'm guessing you could do something
like this:
Lest say table A = Blog, B = entry and C = blogentry
Blog.objects.filter(entry_
Sorry for the double post. The table should have been A = Blog, B =
blogentry and C = entry
On Dec 7, 1:12 am, andy wrote:
> Well django has a ISNULL which I guess could be use to get the result
> that you want. I'm a bit new to django and have not done any many-to-
> many relatio
Did you get the next parameter in the login template and append it to
form action, If that is not done then once the form is submitted the
next param would be lost.
On Dec 7, 5:45 am, vamsy krishna wrote:
> request.GET returns an empty dict
>
> On Dec 7, 3:35 pm, Kenneth Gonsalves wrote:
>
> > O
skills
8) A desire to work for a very cool company (my client's), writing
code for a huge consumer facing website
If this sounds like you, please send your resume to me asap, and we'll
see what we can make happen.
Thanks,
Andy
www.aajinteractive.com
--
You received this message becau
I am (still) new to Django and a novice at relational databases, so I
am having some problems. I've read and read, but can't sort this out.
I have a customer enter data into a form. The model is here:
class Order_Info(models.Model):
date_stamp = models.DateTimeField(auto_now_add=True)
Wow!How high can he go?? He scares me. So beautiful dolphin tone .
http://www.gamestar.ws/en-video/Vitas.htm
Please tell us about your opinion.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
blem. Is there an easier solution?
Thanks in advance,
Andy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubsc
is adapted to the svn version though.
Simon, excellent idea. I guess I was going for something way too
complicated, where your solution should've been completely obvious.
However, if you want other variables (other than just the media host),
then Jame's idea sounds pr
I'm having some trouble with the object.get__url() results
for my image field. I'm trying to get this going with the Django's
(ver 0.95) development server in WinXP. I have the following line in
my model:
avatar = models.ImageField(upload_to='users/', blank=True, null=True)
I have the followin
I have just set up a blog using the helpful tutorial over at http://fallingbullets.com/blog/2006/aug/06/wordpress-clone-27-seconds-part-1-40/";>Falling
Bullets, and now I am looking to do a little customization.
I am completely new to Django and Python, so if this question seems
simple, forgive m
I have just set up a blog using the helpful tutorial over at
http://fallingbullets.com/blog/2006/aug/06/wordpress-clone-27-seconds...
and now I am looking to do a little customization.
I am completely new to Django and Python, so if this question seems
simple, forgive my niavete. Here is the cod
Do I need to include {% for object in latest %}? Or, does this replace
it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To
Okay, so I've put in that code and it processes it fine and everything,
however, all the entries are being placed in the else section, the
filter for counter "1" doesn't seem to be grabbing the latest article.
Is there another filter that could maybe grab it?
--~--~-~--~~
PS the site is main.howcurio.us/blog
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send ema
http://paste.e-scribe.com/2598/
Check it out!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group
It doesn't seem to be working, or at least it hasn't yet come out that
way. I made another attempt where I essentially left out the {else} and
nothing at all rendered, so that filter doesn't seem to be catching it.
--~--~-~--~~~---~--~~
You received this message
Hazaa, that seemed to have done the trick. When I have a second, I'll
try to debug the sucker too, that way we can have some closure on your
method, Rajesh. Thank you both for your help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
Rajesh, I added in the counter and it popped out "1" for the first
entry, so I am unsure why your method didn't work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
It's namely the second I'm worried about. I have an ordered list and I
want the first entry to have a special style, something to the degree
of "new content." I want to target the second one because I want it to
start the "old content" section, with a different style, like a fade on
top, or someth
enior person
who know Python/Django inside and out.
The hourly rate would be around $80/hr. You would be required to be
on-site in NW DC a couple of days/week (probably like 3), although some of
the work could be done remotely.
Please let me know if you are interested.
Thanks,
Andy Nussbaum
a
great knowledgeable folks who want to work in DC (NW), and push
the cutting edge of the technology.
Let me know if you're interested, and I'll be happy to forward you the
complete job details,
Andy Nussbaum
AAJ Interactive Technologies
--
You received this message because you are subscribe
req - but you know who you are. If you're a
great Python developer, looking to do cool web development, on a site that
will be viewed by a ton of people (one you'll be excited to tell people you
are working for), then you should get back to me asap.
Hope to hear from you soon,
And
27;re interested, and we can chat.
Sincerely,
Andy Nussbaum
Our client is looking for qualified candidates for a Web Architect
position. The successful candidate will be a charismatic leader and
passionate web architect with a proven track r
I'm trying to understand how does request.user work.
Looking into the source code of the HttpRequest class (https://
code.djangoproject.com/browser/django/trunk/django/http/
__init__.py#L135) there is no "user" attribute for HttpRequest.
So where is the "user" attribute defined? And which code is
Thank you.
So LazyUser is there to cache the user instance.
In LazyUser(object), the user instance is stored in
request._cached_user
In AuthenticationMiddleware(object), the user instance is stored in
request.__class__.user
But I don't see request.user being assigned at all. Where does that
hap
1 - 100 of 630 matches
Mail list logo