hello,
I try to redirect a user who comments a post on my blog to the same
page,
to do that, i need to use the signal : 'comment_was_posted'
i have put the code below in my blog 'models.py' to be sure it has
been loaded,
but when i post a new message, i'm not redirected to google ...
from djang
Hi Django peeps,
Right now, I am in the middle of trying to secure a django app's admin
and store areas (satchmo).
I have installed a self-signed certificate for testing purposes and I
am able to encrypt all pages just fine EXCEPT for the admin page. Here
is my setup:
ubuntu 8.04 and apache2 wi
headers not being installed. I don't
think this is causing a problem since I can encrypt some pages, but I
though I would mention it.
Thanks,
Sam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
ield, the exception
goes away. The issue is that the default encoding is ascii and so
unicode() called on a utf8 byte str blows up. The CharField
implementation simply checks if the value is an instance of basestring
and just passes it through. This latter approach seems better to me.
As it stands, I
Here it is!
http://code.djangoproject.com/ticket/13758
Any feedback on that ticket would be appreciated.
Regards,
Sam
On Jun 13, 11:20 pm, Karen Tracey wrote:
> On Sun, Jun 13, 2010 at 8:22 PM, Sam wrote:
> > As it stands, I'm inclined to think this issue is a bug.
>
&g
uld appreciate any
feedback on this, it has come up and I am at a loss to explain this
behavior in the admin. Am I missing something?
Thanks much,
Sam
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
tl;dr version:
admin "view on site" link returns the first Site associated with a
model, rather than the current Site. Is this correct? It seems that it
should return the current site (if it is picking one arbitrarily)
-Sam
On Jun 29, 11:19 pm, Sam wrote:
> Hello,
>
> I
Thanks both of you.
To synthesize :
It is possible to put flags at the end of our urls match strings.
Those are (?iLmsux) corresponding to re.I, re.L, re.M, re.S, re.U,
re.X
In this case, re.U is for (source : http://docs.python.org/lib/node46.html
):
UNICODE
Make \w, \W, \b, \B, \d, \D, \
This is how i use profile_callback with django-registration :
1. define the profile_callback function :
# profile/models.py
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
class ProfileManager(models.Manager):
"
'^register/$',
register,
{'profile_callback':Profile.objects.create},
name='registration_register'),
On Jun 24, 6:27 pm, Sam <[EMAIL PROTECTED]> wrote:
> This is how i use profile_callback with
>From this URL http://djangoamf.sourceforge.jp/index.php?DjangoAMF_en :
Django AMF is a Middleware for Django web framework written in Python.
It enables Flash/Flex applications to invoke Django's view functions
using AMF(Action Message Format).
A MiddleWare is a piece of code that is hooked in
import urllib
from django.http import HttpResponse
def output_file(request, file, mimetype):
f = urllib.urlopen(file)
data = f.read()
f.close()
return HttpResponse(data, mimetype=mimetype)
It is better to serve from static environments but sometimes, you want
to check user righ
hello,
i'm looking for a way to authorize user to add date like '2007-00-00',
or '2004-04-00', when he doesn't know precisely the day or the day and
the month of a date.
is someone has got a way to do this ?
thanks
--~--~-~--~~~---~--~~
You received this messa
I have translated Cal Henderson's lib_filter.php to python.
If you need to filter your users HTML input, you might like it.
http://amisphere.com/contrib/python-html-filter/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I have updated the script to version 1.15.2 ( i started at the
translation version ) with two other features:
- turn text URLs into clickable URLs
http://www.djangoproject.com/ becomes http://www.djangoproject.com/
- blacklist regexp URLs
filter.forbidden_urls = ( r'^/delete-account/', )
Click t
html-filter/html_filter.py
On Mar 7, 11:52 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Sam, there's a filter for clickable URLs built-into Django, too.
> Smacked my head when I found that one.
>
--~--~-~--~~~---~--~~
You rec
You can see the power of "HTML Filter" by looking at the unit tests.
http://amisphere.com/contrib/python-html-filter/html-filter-test.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
I have enhanced and fixed some bugs inside "HTML Filter"
What it does :
html_filter removes HTML tags that do not belong to a white list
closes open tags and fixes broken ones
removes javascript injections and black listed URLs
makes text URLs
I needed slugify to be more precise with accented characters and i
couldn't find some code to do it, so here it is :
http://amisphere.com/contrib/python-django/slughifi.py
http://amisphere.com/contrib/python-django/ for a quick overview
example :
>>> text = "C'est déjà l'été."
>>> slughifi(text
You should go with a MiddleWare.
http://www.djangoproject.com/documentation/middleware/
Here is a basic example:
from django.http import HttpResponseRedirect
class AccessMiddleware(object):
def process_request(self, request):
# Insert your Auth Code
if authorized:
It's up to your code inside the middleware to restrict or allow the
access.
For example, you could check the request.META['PATH_INFO'] for zones
where the middleware shouldn't do anything.
On Mar 13, 4:47 pm, "Stephen Mizell" <[EMAIL PROTECTED]> wrote:
> > You should go with a MiddleWare.
>
> Wi
Like Todd said,
1. Write a function :
def my_template_vars(request)
return {'var1': 'test', 'var2': 'test2'}
2. Edit your settings.py
TEMPLATE_CONTEXT_PROCESSORS = (
...
'project.app.file.my_template_vars',
)
3. Inside your views, load your templates with a RequestContext object
if
Why don't you also use request.META['PATH_INFO'] at production level ?
uri = request.META.get('PATH_INFO')
On 28 avr, 12:53, "omat * gezgin.com" <[EMAIL PROTECTED]> wrote:
> I need to use the current request URI in a template. Thus, I am
> passing the uri as a context variable, which is:
>
> uri
I didn't go with PostGIS because i only needed basic functionality and
approximative data.
In my models, i have :
lat = models.FloatField(max_digits=7, decimal_places=4, blank=True,
null=True)
lng = models.FloatField(max_digits=7, decimal_places=4, blank=True,
null=True)
I'm using it together wi
Your request is called a "captcha"
You can find examples in the groups or there :
http://code.google.com/p/django-captcha/
http://www.djangosnippets.org/tags/captcha/
On 22 mai, 09:59, Xin Xic <[EMAIL PROTECTED]> wrote:
> Hello,
>
> First, sorry for my english.
>
> Well, I want out a form for
I use .96, UTF-8.
I couldn't update a user instance with strings containing unicode
special characters in my views but it worked with the admin interface.
Some of you may encounter this problem, so here is the solution...
I got this error :
UnicodeEncodeError at /profile/xxx/edit/
'ascii' code
Most of the table mapping is taken from a GPL project.
I've just emailed the authors to see if they would relicense the file
to include it inside django.
I'll update as soon as i have their replies.
On 25 mai, 10:44, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> On Fri, 2007-05-25 at 10:31 +0
I couldn't find ImageField validation in .96
To validate your images, just try to open it with PIL
from PIL import Image
from cStringIO import StringIO
try:
image = Image.open(StringIO(request.FILES['picture']
['content']))
except:
# raise error here
In practice, I handle pictu
It looks ugly to me but did you try:
>>> ustr
u"{'var': 'val'}"
>>> dic = eval(ustr)
>>> dic
{'var': 'val'}
On 25 mai, 12:40, Christian Schmidt <[EMAIL PROTECTED]>
wrote:
> > To validate your images, just try to open it with PIL
>
> When I said I validate the image then did I mean that I try to
Found there :
Non-ASCII Tag Names in URLs
http://code.google.com/p/django-tagging/wiki/UsefulTips
I thought it is used to convert to unicode but it doesn't seem
effective.
Anyone knows about other flags ?
--~--~-~--~~~---~--~~
You received this message because y
this ?
sam
--~--~-~--~~~---~--~~
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 email to [EMAIL PROT
standard django admin)
and I would like that just a category of user can modify the
publish_status (always in the standard django admin).
?
thx
sam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
thx for your answer,
so, I have found a translation of goFlow in english, may be it could
be more understandable to you ?
http://code.djangoproject.com/wiki/GoFlow
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
I had this error because i'm not using the auth module.
If that's you case, comment it out in your settings.py file:
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
# "django.core.context_processors.auth",
)
On Jan 5, 5
Django version 0.91. I was trying to generate a thumbnail for an image
upload. The image is a FileField. I want to generate thumbnail in
_post_save() of the model object. The code is something like the
following:
class Item(meta.Model):
...
file = meta.FileField(upload_to="files",blank=Tr
w do I get around
this?
What if I want to define bar() in another file under the same
app/models directory -- how do I refer it in my model file?
Thanks,
Sam
Amit,
My bar() is a pure function defined outside all model classes but that
gave me the error. (If I defined it inside the same class from which it
was called, then it's OK). How do I deal with this?
To import, what package path should I use?
Sam
In "update_object" generic view, I want to go back to the object_detail
page whose URL is like /app/obj//, after the update operation. How
do I specify post_save_redirect to do that?
I observed a weird thing with the integer field defined inside a model
class. Suppose I have
SEX_TYPE_CHOICES = (
(1, 'male),
(2, 'female'),
)
class Person(meta.Model):
sex = meta.Integerfield(choices=SEX_TYPE_CHOICES)
def is_male(self):
if self.sex == 1:
retu
I have a model such as:
class Part:
maker = ForeignKey(Maker)
..
When I make a form to enter the "part" information, if I user standard
AddManipulator, maker will become a selection list of all possible
makers. What if I only want to show a sub-list of makers that belong to
a specifi
My problem is the "category" is determined at run-time, not at module
definition time. How to do that? Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
Nesh:
Your method works. Thanks very much!
Now a tougher situation:
I want to have the same form to enter "part" information, except the
maker field I want to split into two fields: "category" and "maker". I
want to show different selections in the "maker" field based on what
was selected in th
Hi there
I'd like to add the filter function to my own view much in the same way
admin interface does it - i.e. filter based on the values of multiple
model fields. I am puzzled how to define the URL pattern and how the
matched pattern data gets passed to the view. Let's say I have 3
fields, each
A newbie question:
I am using Django admin's authentication to do login/logout for my own
application. I want to automatically log user out if no activity for 5
minutes. I read the session tutorial and played a bit with
SESSION_COOKIE_AGE -- but it doesn't work for me. Any suggestion
appreciated.
Hi All,
I'd like to change the naming convention when creation Django models.
For instance I don't want to append "_id" to the foreign key field
name. It is apparently possible to change this behavior.
Thanks in advance.
Regards,
Sam
--~--~-~--~~~
Adrian,
Thanks for your reply.
Waht about the table names? I'd like to remove the 's' at the end of
each name.
Regards,
Sam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&quo
Thanks for the pointer.
I'm a little tired today. Should have found it myself ...
--~--~-~--~~~---~--~~
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
I want to use FileField to upload files but I don't want the file URIs
directly visible to the user. Rather, I want to service the access to
the uploaded files via "views", so that I can exercise file access
permission (I implemented access permission myself, without using
django admin's). I think
I would like to get help on how to use Django DB API to accomplish the
equivalent of the following SQL statement:
select a from X, Y where X.f = Y.id and Y.c=123;
X has field a, f and Y has field id, c.
f is foreign key of Y and Y's primary key is id.
Thanks in advance.
--~--~-~--~---
I was trying complex Q and notices if I do:
complex=(Q1 | Q2)
and
complex = (Q1 or Q1)
the results are not the same. I got right result using "or" but not
with "|". Is this a bug or I did something wrong? What is the
difference between these two operators?
--~--~-~--~~---
I have the following problem:
Give two models and a M2M relationship:
class Product(meta.Model):
category =meta.IntegerField()
...
class Part(meta.Model):
products = meta.ManyToManyField(Product)
...
I want to find all products that belongs to a certain category (say
"3") and i
I have 3 tables: Continent, Country and Story.
Country has ForeignKey(Continent) and Story has ManyToManyField(Country,
blank=True) field.
What I need is to get a list of countries which at least have one story
belonging to it, and I need these countries grouped by continents.
How can I achi
Hello,
I have an issue trying to run tests.
My application use a migration to have default fixtures (created using
migrations.RunPython from a migration file).
The problem is when I launch manage.py test, the fixtures from the
migration are created on the "production" database and not on the t
Well, answer is here:
https://docs.djangoproject.com/en/1.7/topics/testing/overview/#rollback-emulation
Need to use serialized_rollback = True in TransactionTestCase
Le mercredi 4 mars 2015 18:24:34 UTC+1, sam a écrit :
>
> Hello,
>
> I have an issue trying to run tests.
> My ap
I have 3 models. Question, Choice, and ChoiceColor.
class Question(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
question= models.CharField(max_length=200)
class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choic
tle': loc.location.title, 'id':
> loc.location.id, 'state_id': loc.state.id, 'name': loc.name} \
> for loc in locations.iterator()
> ]
>
> render_to_response('template.htm', {'results': results})
>
> I run a query si
Hi
I am using django 1.0 to redevelop a website.
I have read http://docs.djangoproject.com/en/1.0/topics/db/queries/ and cant
work out how to do my query except using raw sql. It would be great to be
able to use the django query api so i can stack queries more easily.
Just one working example woul
ign key relationship work
with the current schema then I will move it as you have suggested.
Do you know how to build the admin.py to circumvent this issue?
On Mon, Jun 29, 2009 at 6:51 PM, Daniel Roseman wrote:
>
> On Jun 29, 4:57 am, Sam Walters wrote:
> > Hi
> > I am using d
It should not matter. Any modern Linux Distro which supports the
dependencies will be no different.
The only conceivable way this question makes sense is if you want to make
install or deployment easy. In which case use something thats based on a
debian, fedora type distro where there is heaps of
Yes, because unless you copy the admin site's media over to your
MEDIA_URL (or vice-versa), Django won't be able to find the admin
media.
>From http://docs.djangoproject.com/en/dev/ref/settings/
ADMIN_MEDIA_PREFIX
Default: '/media/'
The URL prefix for admin media -- CSS, JavaScript and images
Forgot to add - the usual trick is to symlink the admin media in your
MEDIA_URL; that way you don't have to set up two different aliases in
your web server config.
2009/7/13 Sam Lai :
> Yes, because unless you copy the admin site's media over to your
> MEDIA_URL (or vice-versa),
riod you require. One way to do that is entirely with Squid, but
another would be to modify your app to output HTTP cache control headers
(Expires, Cache-Control, etc). I'm not sure how to do that in Django but I
imagine it shouldn't be too hard.
-sam
--~--~-~--~~-
Try:
getattr(eachalert, criteria1_metric1) or something similar. look up
the getattr python function.
On 7/14/09, David wrote:
>
> still no lucky...
>
> Traceback (most recent call last):
> File "", line 1, in
> File "/home/dwang/alert/../alert/message/models.py", line 245, in
> check_crit
Hi Django world
I keep getting problems accessing and storing data in foreignkey and
one-to-one relationships.
Error is basically of the form:
"AttributeError
Exception Value: 'DirectoryAdmin' object has no attribute 'abbrev'"
The models.py file is here:
http://pastebin.com/mcc4ee45
The SQL it pr
ead you should
create a new model for friends and link users to friends with a one-to-many
relation. Each friend can have a single character field for their name,
which will give you a list of strings (friends) attached to each user.
Does that make sense?
-sam
--~--~-~--~~--
Did you forget any imports?
Maybe your code snippet's identifiers clashed with the default django ones?
Are there any errors in stdout?
2009/7/21 cwurld :
>
> Hi,
>
> I have a snippet of code that runs fine as a standalone program. But
> when I incorporate it into a view and access that view w
There's also the free Komodo Edit (and the more featureful Komodo IDE)
from ActiveState, which supports python and the django template
language among other things, and is cross-platform too.
2009/7/29 Jamie :
>
> On the mac, there's textmate (an editor, not an IDE), which has a
> language plugin
n.com/m67363386
Any help completing/explaining this would be greatly appreciated and
open the floodgates towards understanding how to do this for all sorts
of pythonic/django overloading scenarios.
cheers
-Sam
--~--~-~--~~~---~--~~
You received this message because yo
Thanks David
This example is exactly what i was hoping for.
I hope something like this gets put into a tutorial because i guess
many people would need to control exactly what their form looks like.
Cheers
-Sam
On Tue, Aug 4, 2009 at 11:00 PM, David De La Harpe
Golden wrote:
>
> Sam W
, and what that is.
I thought syncdb did this, but it doesn't seem to. I think this would
be quite useful to have, and could pre-empt errors later on when
non-existent fields are used in views etc.
Sam
--~--~-~--~~~---~--~~
You received this message because y
I have a piece of middleware which assigns the right MIME type based
on URL extension, then I have templates for XML, JSON and HTML. My
view function simply gets the required context objects, then passes it
to the appropriate template.
This could probably be generified to make it more reusable.
sn't have built-
> in solution for that.
> Try using South (http://bitbucket.org/andrewgodwin/south/overview/),
> it is a very good db migration app. I suggest using development
> version because (based on my experience) it is more robust than last
> official release (0.5).
>
Hi
Its probably not the browser. I am using firefox 3.5 on an eee pc and
the documentation is fine. This is with Javascript disabled using
noscript however i just turned it on again and no noticable difference
in top readings
*You should look at the install addons of firefox, eg: some plugin
whic
Can you show us the generated template HTML, and if possible, the
expected result?
That way we can work out the issue with your django templates, rather
than trying to guess your code.
2009/8/9 WilsonOfCanada :
>
> I tried that before, but it only seems to work when it is used on
> the .html fil
You need to install python then django first before trying the
tutorial - start here
http://docs.djangoproject.com/en/dev/intro/install/
2009/8/16 Thiago511 :
>
> I went to that link you gave me. I tried it, and I go the same error
> message.
>
> they told me to:
>
> "From the command line, cd in
ath to your python executable.
To make things easier later, add the directory containing the python
executable to your system path (Control Panel -> System -> Advanced ->
Environment Variables -> PATH).
2009/8/16 Thiago511 :
>
> python and Django are both installed already
>
>
You added the directory containing django-admin.py to your PATH right,
not the path of django-admin.py itself?
If you want, type 'set path' (without quotes) into your command prompt
and paste the result here and we'll see if you did it right.
2009/8/16 Thiago511 :
>
> UPDATE:
> Well I added djan
eld.
Do I need to do some extra step to make my custom permissions
available to admin site?
Or am I completely missing the point of custom permissions?
Thank you.
Sam.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&quo
again.
Sam.
On Mon, Aug 17, 2009 at 3:47 AM, fabrix wrote:
>
> On Aug 16, 2:29 pm, sam lee wrote:
>> I run syncdb and runserver
> [...]
>> But I don't see the myapp | test_perm listed under Permissions field.
>
> permissions are stored in db, syncdb doesn
Would be easy enough if you just wanted to use the routing, views and
template parts of Django though.
Sorry, no experience though something that I've been wanting to try
for a while. Unfortunately, the current project doesn't call for that
kind of db.
2009/8/18 Joshua Partogi :
>
>
> On Tue, Au
2009/8/21 Gerard :
>
> Hi All,
>
> I'm working on an invoice system, currently deployed the single user version
> in house. Next one is gonna be a full blown multi user setup. Having
> fairly good knowledge of security, I was wondering what would be best
> practice in Django for data separation.
2009/8/22 ashish tiwari :
> hi Friends
>
> i heared about the json format
> django provided utility of dumpdata, loaddata which dumps and loads data in
> json format.
>
> but i dont know,how to use it..
>
> i want to dumpdata...from my app
>
> name of iFriends
> name of People
>
> iFrien
Use python to call a PDF reader via the command line -
http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm
http://foxit.vo.llnwd.net/o28/pub/foxit/manual/enu/FoxitReader30_Manual.pdf
(see the Command Line section)
Depending on the complexity of your PDFs, I'd recommend using Foxit
instead
ow if that's possible? My searches of the docs and code haven't
turned up much yet.
Thanks,
-sam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
ere are security risks associated with this
option.
>
> Marc
>
> On Aug 26, 1:46 am, Sam Lai wrote:
>> Use python to call a PDF reader via the command line -
>>
>> http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm
>>
>> http://foxit.vo.llnwd.net/o
a generic queryset
qset = blah.objects.all()
# tell qset to use the new connection:
qset.use_db(db)
# and then apply some filters
qset = qset.filter(...)
# and execute the query:
for object in qset:
...
-sam
--~--~-~--~~~---~--~~
You rec
y to turn this cache off? Looking
at the code leads me to think no, but I thought I'd ask.
-sam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
erySet cache system works. Maybe I'll see about a
patch.
-sam
--~--~-~--~~~---~--~~
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
an app under another user account.
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/runas.mspx?mfr=true
> Thanks so much for your help
>
> Marc
>
> On Aug 27, 2:42 am, Sam Lai wrote:
>> 2009/8/27 mettwoch :
>>
>>
>>
>> &g
On Thu, Aug 27, 2009 at 8:18 PM, Alex Gaynor wrote:
>
> On Thu, Aug 27, 2009 at 5:56 PM, Sam Tregar wrote:
> > On Thu, Aug 27, 2009 at 5:47 PM, Alex Gaynor
> wrote:
> >>
> >> Instead of iterating over the QuerySet itself, use
> >> QuerySet.iterator(), t
2009/9/2 Kenneth Gonsalves :
>
> On Tuesday 01 Sep 2009 10:55:18 pm mrsource wrote:
>> - It has many tools for safety, with a normal opensource CMS you have
>> many more issues with security holes because all the code is public.
>
> this is sheer FUD to say that 'many more issues with security hol
Vim in conjunction with Git - most powerful + extensible editor out
there in my humble opinion.
On Thu, Sep 10, 2009 at 7:46 PM, boyombo wrote:
>
> Vim + pydiction + django.vim
>
> On Sep 10, 1:31 pm, eka wrote:
>> Vim + RopeVim + Omincompletion + taglist + tasklist + python_fn
>>
>> On Sep 10,
On Mon, 2009-05-11 at 07:55 -0700, eric.frederich wrote:
> Hello,
>
> I need to set up a view for administrators of an application that I am
> writing where they can edit a subset of fields on a particular model.
> It was pretty simple...
>
> EnrollmentFormSet = modelformset_factory(Enrollment,
On Mon, 2009-05-11 at 10:59 -0700, eric.frederich wrote:
> Hmm, thats almost what I need. I guess I didn't fully explain what I
> need.
> I do need to limit the number of fields that are shown, but I also
> need to make some of them view only.
I don't think this "view only" feature exists. Googl
On Mon, 2009-05-11 at 17:31 -0700, Glen Jarvis wrote:
> Both forms have a 'name' attribute. And, both forms are in a template
> together. (I mean that both form instances are created for the
> specific instance of the model in question, and are displayed together
> (very interleaved) in a template
On Wed, 2009-05-13 at 05:21 -0700, Dave Brueck wrote:
> Has anyone in this group implemented any sort of login-as-another-user
> functionality with Django?
I implemented "sticky superuser logins" about a year ago (the last
time I worked with django until now), so I can attest it is a neat
trick,
On Fri, 2009-05-15 at 14:00 -0700, Joshua Russo wrote:
> I can't seem to get pdb to stop at my break points for a page request.
> I start it like so:
>
> (from the directory containing manage.py) python -m pdb manage.py
> runserver
Have you tried this?
python -m pdb manage.py runserver --norelo
On Fri, 2009-05-15 at 19:53 -0400, Joshua Williams wrote:
> When trying to access a user defined profile, using get_profile, I
> am
> getting an error when accessing the profile for a user. Just so I
> have my bases covered, here is my model class:
>
> class UserDetail(models.Model):
>
2009/5/17 sampablokuper
> I've been encountering the same problem. It's especially frustrating
> because it seems model validation used to be much easier in Django
> (see
> http://www.cotellese.net/2007/12/11/adding-model-field-validation-to-the-django-admin-page/
> ).
> [...]
>
> Are the Django
On Fri, 2009-05-15 at 15:12 -0700, nih wrote:
> in the admin change form the select box only shows name.username (eg
> nih)
> is it possible to show the full name in the select box
You are looking to override label_from_instance(). See here
http://docs.djangoproject.com/en/1.0/ref/forms/fields/#
1 - 100 of 511 matches
Mail list logo