Yes. You have to use RequestContext. If you don't use it django will
not execute context processors and user variable never be passed into
context
On 4 сент, 00:41, Robert <[EMAIL PROTECTED]> wrote:
> I'm not sure that requestContext was what i needed... I need simply to
> be able to get user dat
Check your TEMPLATE_CONTEXT_PROCESSOR setting. auth TCP must be
installed
http://www.djangoproject.com/documentation/templates_python/#django-core-context-processors-auth
On 3 сент, 22:33, Robert <[EMAIL PROTECTED]> wrote:
> Hi all, I'm new to Django and python in general, so please overlook my
>
Something like this:
from django.db.models import Q
import operator
query_set = Post.objects.all()
users = [ Q( user = user) for user in [ user1, user2, user3 ] ]
query_set = query_set.filter( reduce(operator.or_, users ) )
--~--~-~--~~~---~--~~
You received this
Yes you can try to play with custom template tags or with context
processors
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Each field class has to_python() method:
class MyModel( models.Model ):
date = models.DateField()
#
field = MyModel._meta.get_field( "date" )
date_obj = field.to_python( "2007-09-03" )#date_obj is python Date
instance
--~--~-~--~~~---~--~~
You received
In list_events view you have to pass your polls list into context to.
...
from mysite.polls.models import Poll
...
def list_events(request):
latest_event_list = Event.objects.all()
latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
return render_to_response('events/ind
Please show your views code or tell what you pass into template
context.
--~--~-~--~~~---~--~~
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 un
save() is method, so it must get at least one parameter - self.
def save( self ):
...
>
> TypeError at /admin/envwork/environment/12/
> save() takes no arguments (1 given)
>
> Any thoughts?
>
--~--~-~--~~~---~--~~
You received this message because you are s
There is no way to use admin's calendar into regular pages with
newforms. You have to implement it by yourself.
On 3 сент, 11:07, picky <[EMAIL PROTECTED]> wrote:
> That's what I was thinking. I try it but I don't fuind how to display
> calendar button.
> I don't see anything in http code of an a
Just put the full import path to your app in INSTALLED_APPS. It's no
mater where this application lies.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
Markdown wraps all text in tag so truncate_html doesn't work
--~--~-~--~~~---~--~~
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 f
In shell:
export PYTHON_PATH=/path/to/dir/where/settings.py/script/lies/:
$PYTHON_PATH
export DJANGO_SETTINGS_MODULE=settings
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
Yes, you may use EmailMessage class that is more flexible then
send_mail function
http://www.djangoproject.com/documentation/email/#the-emailmessage-and-smtpconnection-classes
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
This is not site name, it is project name. This is a big difference.
You can skip project name and write only app_name.module_name but this
is not save and can cause name conflict.
No, it doesn't make any difficult to move into another production
environment. You can make application sets with som
{%with%} tag creates only alias to variable. You cannot use it as
parameter and "regular" context variable too.
So you have to redesign you code.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
You can do in django interactive shell.
http://www.djangoproject.com/documentation/django-admin/#shell
Or set DJANGO_SETTINGS_MODULE environment variabale ot your project
settings.py
http://www.djangoproject.com/documentation/templates_python/#configuring-the-template-system-in-standalone-mode
R
No, you can not collapse edit inline block in admin.
--~--~-~--~~~---~--~~
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
There is no way to do so in django admin now.
--~--~-~--~~~---~--~~
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,
What is field.choices ? object_list doesn't pass _field_ variable to
context.
http://www.djangoproject.com/documentation/generic_views/#django-views-generic-list-detail-object-list
see Template context section
--~--~-~--~~~---~--~~
You received this message becaus
try this:
from django.core.management import call_command
call_command( "reset", models.get_app('myapp'), interactive = False )
call_command( "load_data", [FIXTURE_PATH], verbosity = 0 )
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
301 - 320 of 320 matches
Mail list logo