Really hoping someone can help---didn't get any responses on stackoverflow,
and django docs don't seem to give an exact answer.
I have a bunch of views where I check if certain conditions are true before
executing. I'm concerned about one user using a view that changes the
data after the
I'm working with a model that has an HStoreField field named "options". The
options field on a model instance is a dictionary when running the
webserver, but is a string when in the shell. This isn't simply a matter of
it being coerced by the shell; the model's attribute dictionary and *dir()*
Hi,
I'd like to make a mixin to set the placeholder text in the widget attrs.
Reading this https://code.djangoproject.com/ticket/5793, it seems that
extending Meta for custom fields is somewhat discouraged.
Would the following be the recommended way to do it? Just adding a class
variable to t
You should be able to use *request.user.email*, assuming you have the
*django.contrib.auth* app installed and the user is logged in.
On Tuesday, March 22, 2016 at 1:33:39 PM UTC+1, Vasu Dev Garg wrote:
>
> I want to get the email address of the user which i filter in views
> function. How to ge
But if I don't set the SITE_ID in settings.py I can't use the
CurrentSiteManager, correct?
On Tuesday, March 22, 2016 at 1:33:39 PM UTC+1, Sai Kiran wrote:
>
> If you need to use single projects for more than domains, create an entry
> in django_site model by giving domain as well as verbose na
self.fields[name].widget.attrs['disabled'] = 'disabled'
self.fields[name].widget.attrs['readonly']=True
is not make real readonly to field, because if user can edit the html on
client side, and remove disabled="disabled" and readonly input atributtes
to problem of readonly fields, i currently use
Actually I do to set permission to each field. A field in the form can be
viewable and editable, only viewable, or hidden. So if user has a
permission to see the form, but edit some fields in the form, it gets very
tricky especially for validation.
For example I used these statements to make re
Maybe you already know this, but you can do a lot of form tinkering in
__init__, like so:
def __init__(self, permissions_parameter=None, *args, **kwargs):
super(FormName, self).__init__(*args, **kwargs)
if permissions_parameter:
#do a bunch of form tinkering
--
Y
Thanks for your response. Currently I am dealing with a form with
individual field permissions. I guess it explains it gets difficult with
Django Form, which are made for only editing. I know a custom read-only
field can be created in the code below. I am still struggling with post
the form wi
On Mar 21, 2016 7:24 PM, "Anthony W Smith" wrote:
>
> When I follow django tutorial on the django site for the polls app I keep
getting the error after runnig the python manage.py runserver command it
says no modsule named my site.
You could
1) show us your directory structure
2) delete the direc
If you need to use single projects for more than domains, create an entry
in django_site model by giving domain as well as verbose name. Don't give
any SITE_ID in settings.py, instead of this you can use
Site.objects.get_current() in your view and compare the domain names and
change the header
I want to get the email address of the user which i filter in views
function. How to get it?
--
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+unsubs
where are you running the ./manage.py runserver
it should be in the same root
Agbeko Frank
+233 0243 013 730
On Tue, Mar 22, 2016 at 11:10 AM, Rafael E. Ferrero <
rafael.ferr...@gmail.com> wrote:
> do you already have your site on setttings.py ?
>
>
> Rafael E. Ferrero
>
> 2016-03-21 20:24 G
do you already have your site on setttings.py ?
Rafael E. Ferrero
2016-03-21 20:24 GMT-03:00 Anthony W Smith :
> When I follow django tutorial on the django site for the polls app I keep
> getting the error after runnig the python manage.py runserver command it
> says no modsule named my site.
Have your tried to replace the view return with something similar to this line ?
return render( request, '/signup.html/', {'data': sorted(
currPersonData.items( ) ), 'eb': Elective.objects.all() }, )
2016-03-22 7:57 GMT+01:00 Pemby :
>
>
>
> All of the above seems to be working the way I ex
My goal: If user "foo" comes to the me (playing the admin role) and says: I
don't have permissions for URL "foo-url", then I want to enter
the URL and the username into some admin interface and then the this should
tell me why the user is allowed or not allowed to access the URL.
Example output:
16 matches
Mail list logo