NB :i'm new to learn django... as well student and stuck in Template Tag
task (Sorry if i asked silly question).
--
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
Hi !
Is it possible to force a model to appear on the admin index page depending
on the request ?
I'm asking because I did override the has_change_permission() method of the
ModelAdmin, so that the user can be allowed to change some instances
(chosen via a ManyToMany relationship betwee
I think it’s clear to me what you are trying to do. By overriding those
> methods in BarAdmin you go down that line (bypass the django admin
> permission system), but to get the app listed in the admin index page you
> would have to actually rewrite the view function. This view functi
I think it’s clear to me what you are trying to do. By overriding those methods
in BarAdmin you go down that line (bypass the django admin permission system),
but to get the app listed in the admin index page you would have to actually
rewrite the view function. This view function makes an
y.
Which is the function in charge of checking for which models the user has
permissions in the admin index page? I could override that one as well, as
I did for the model with "has_add_permission".
Thanks,
Andrea
--
You received this message because you are subscribed to the Go
d, but it's not shown in the admin index page (and that's
my problem).
What I do not want to do is to specifically assign the `foo.add_bar`
permission under the `permissions` section in the user profile for each
user.
Thanks for your time spent in tackling this issue.
Andrea
2014-10-07 1
True
> Accessing the link admin/foo/bar/ works correctly for every user and returns
> the list of Bar instances for which obj.owner == request.user.
> admin/foo/bar/add allows the user to add a new object correctly. These links
> are although not displayed in the admin index page:
== request.user.
admin/foo/bar/add allows the user to add a new object correctly. These
links are although not displayed in the admin index page: which is the
function that triggers the appearance of the model in the index page?
admin/foo/ returns 403 Forbidden.
I'm using Django 1.7
Thanks,
An
ercuri, 11 ianuarie 2012, 04:51:07 UTC+1, kalyan boga a scris:
>>
>> Hi,
>>
>> I was working on tutorial 2 and i tried to change the layout of index
>> page. Copied the index.html template to my template folder under admin and
>> changed the contents to suit the sit
kalyan boga a scris:
>
> Hi,
>
> I was working on tutorial 2 and i tried to change the layout of index
> page. Copied the index.html template to my template folder under admin and
> changed the contents to suit the site. The second line errors out :
> {% load i18n admin_stat
- Reply message -
From: "Peter of the Norse"
Date: Sun, May 27, 2012 9:53 am
Subject: Error with Views on Admin and Index page
To:
Can we see your urls.py? I'm worried that you’re directing to a views.py file
that doesn't actually exist.
On May 24, 2012, at 2
W.11
- Reply message -
From: "Peter of the Norse"
Date: Sun, May 27, 2012 9:53 am
Subject: Error with Views on Admin and Index page
To:
Can we see your urls.py? I'm worried that you’re directing to a views.py file
that doesn't actually exist.
On May 24, 2012, at 2
2009 using Django 1.1. ('m
> using Django 1.3). I did set up Staticfiles (the Django 1.3 way, the
> best I could as a newbie, following djangoproject directions) but
> staticfiles is of course for static pages...I did create a page with
> base.html and css, and was able to view
ections) but
> > staticfiles is of course for static pages...I did create a page with
> > base.html and css, and was able to view that. Are Admin pages and the
> > Index page considered staticfiles? If so, maybe I didn't set that up
> > right?
>
> > On May 24,
id set up Staticfiles (the Django 1.3 way, the
> best I could as a newbie, following djangoproject directions) but
> staticfiles is of course for static pages...I did create a page with
> base.html and css, and was able to view that. Are Admin pages and the
> Index page considered
es is of course for static pages...I did create a page with
base.html and css, and was able to view that. Are Admin pages and the
Index page considered staticfiles? If so, maybe I didn't set that up
right?
On May 24, 1:14 pm, Apokalyptica Painkiller
wrote:
> Are you doing django's t
n, I
> > > got a message saying:
> >
> > > TemplateSyntaxError at /admin/
> > > Caught ViewDoesNotExist while rendering. Could not import views. Error
> > > was: No module named views.
> >
> > > I noticed I also get something similar after I u
ogged in, instead of going to the admin screen, I
> > got a message saying:
>
> > TemplateSyntaxError at /admin/
> > Caught ViewDoesNotExist while rendering. Could not import views. Error
> > was: No module named views.
>
> > I noticed I also get somethi
axError at /admin/
> Caught ViewDoesNotExist while rendering. Could not import views. Error
> was: No module named views.
>
> I noticed I also get something similar after I uncommented the django-
> supplied index page (in urls.py) (which I have also never
> resolved...seems they
message saying:
TemplateSyntaxError at /admin/
Caught ViewDoesNotExist while rendering. Could not import views. Error
was: No module named views.
I noticed I also get something similar after I uncommented the django-
supplied index page (in urls.py) (which I have also never
resolved...seems they m
Hi,
I was working on tutorial 2 and i tried to change the layout of index page.
Copied the index.html template to my template folder under admin and
changed the contents to suit the site. The second line errors out :
{% load i18n admin_static %}
The error on the page reads :
TemplateSyntaxError
On Tuesday, 22 November 2011 22:32:04 UTC, Lee wrote:
>
> DR - thanks for your reply. I need to display the model method result
> (property) on index.html. Our index.html is heavily customized, and is
> currently just a switchboard into the database tables via links like
> this:
>
> {{ app_list.1.m
Hello Lee,
I think what we are trying to get to is when you say index page are you
talking about the admin page that lists the apps and their databases or are
you talking about the change list for a particular database. If it's the
latter then you might be able to do something wit
DR - thanks for your reply. I need to display the model method result
(property) on index.html. Our index.html is heavily customized, and is
currently just a switchboard into the database tables via links like
this:
{{ app_list.1.models.21.admin_url }}
I'm hoping for a similarly simple way to sho
Model(models.Model)
> ...
>def get_my_property(self):
> return '1234'
>my_property = property(get_my_property)
>
> Now I want to display this property on the index page in a {{ }}
> variable tag. What is the correct syntax, and where can I find this in
> the docs
erty(get_my_property)
Now I want to display this property on the index page in a {{ }}
variable tag. What is the correct syntax, and where can I find this in
the docs?
Thanks very much for any help.
Lee
--
You received this message because you are subscribed to the Google Groups
"Django
On Sun, May 8, 2011 at 6:42 AM, Thomas Weholt wrote:
> I've read
> http://docs.djangoproject.com/en/dev/ref/contrib/admin/#reversing-admin-urls
> ,
> but cannot for the life of me find a way to use reverse to get the url
> of the index page for my app.
>
>
The index p
I've read
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#reversing-admin-urls,
but cannot for the life of me find a way to use reverse to get the url
of the index page for my app.
Say my app is called "polls" ( for some strange reason ) and I want to
redirect to the app
I everyone !
I'd like to render stuff on the index page depending on the user's
location but (being a total beginner in web development) i'm not sure
about the right way to do this.
This is how i intend to do it :
In the index's view function :
- Check if the location is se
trane" application does not appear on the admin index page as
> the book suggest.
>
> This is my INSTALLED_APPS in the settings.py in the cms application;
>
> INSTALLED_APPS = (
> 'django.contrib.auth',
> 'django.contrib.content
Guys,
Am going through the practical django book and am trying the weblog
application in Chapter 4, but when i go to test the application on my
cms application (that i created from the same book, from Chapter 2 &
3) "coltrane" application does not appear on the admin index pa
> It isn't a bug. Read the docs. Create yourself an empty 404.html and
> 500.html file in your templates directory and your flatpage will work
> with DEBUG=False.
You are so right!! :) It worked like a charm!
I neglected this box:
"Ensure that your 404 template works
Note that the FlatpageFallb
ratch to reproduce my error. I used the
> instructions provided in the latest documentation to add FlatPages and
> an Admin application.
>
> When I add a FlatPage for my site index page (URL = /) it works fine.
>
> Then, if I change the DEBUG flag to False in my settings.py, the ind
d
an Admin application.
When I add a FlatPage for my site index page (URL = /) it works fine.
Then, if I change the DEBUG flag to False in my settings.py, the index
page is replaced by a 500 error.
I think this is a bug. If someone has the same behaviour it should be
reported.
On Dec 10, 6:35 pm,
On Dec 10, 11:48 am, Nuno Machado <[EMAIL PROTECTED]> wrote:
>
> My urls.py WAS like this:
>
> urlpatterns = patterns('',
> (r'^admin/(.*)', admin.site.root),
> (r'', include('django.contrib.flatpages.urls')),
> )
This is your problem. Did you read this:
http://docs.djangoproject.com/en/
Thanks a lot, Jeff FW and Dmitry Dzhus.
I'm using the most recent release version of Django (installed 5 days
ago). 'django.contrib.flatpages' and 'django.contrib.sites' are
listed in my INSTALLED_APPS.
'middleware.FlatpageFallbackMiddleware' is in my
MIDDLEWARE_CLASSES.
My urls.py WAS l
Nuno Machado wrote:
> If I put / in the URL field, I need to write "mysite.com//" to get
> access to my index page. This is not good for visitors!
It works fine for me when URL of flatpage is just slash, I type in
site.com and see my flatpage. Probably your Django installation
site.com/about) but now
> > > I'm trying to define the index (URL = mysite.com) using flatpages.
>
> > > I'm having troubles defining the URL in the administration panel:
>
> > > If I put / in the URL field, I need to write "mysite.com//" to get
&
e is working flawlessly (URL = mysite.com/about) but now
> > I'm trying to define the index (URL = mysite.com) using flatpages.
>
> > I'm having troubles defining the URL in the administration panel:
>
> > If I put / i
he
> "about" page is working flawlessly (URL = mysite.com/about) but now
> I'm trying to define the index (URL = mysite.com) using flatpages.
>
> I'm having troubles defining the URL in the administration panel:
>
> If I put / in the URL field, I need to writ
l:
If I put / in the URL field, I need to write "mysite.com//" to get
access to my index page. This is not good for visitors!
Your help is much appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&q
Rufman wrote:
> do you by any chance know how the django admin page gets the help_text
> from the model...e.i. how can i get the help_text without having to
> define it again in my custom form?
you can use something like:
>>> modelinstance._meta.get_field('myfield').help_text
where modelinstanc
do you by any chance know how the django admin page gets the help_text
from the model...e.i. how can i get the help_text without having to
define it again in my custom form?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
do you by any chance know how the django admin page gets the help_text
from the model...e.i. how can i get the help_text without having to
define it again in my custom form?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
in. Something like:
> django.views.generic.simple.direct_to_template would do the job.
>
> On Aug 21, 9:12 am, Rufman <[EMAIL PROTECTED]> wrote:
>
> > hi
>
> > does anyone have a good idea how i could make an index page that
> > combines different apps. e.g. the results
in. Something like:
> django.views.generic.simple.direct_to_template would do the job.
>
> On Aug 21, 9:12 am, Rufman <[EMAIL PROTECTED]> wrote:
>
> > hi
>
> > does anyone have a good idea how i could make an index page that
> > combines different apps. e.g. the results
TED]> wrote:
> hi
>
> does anyone have a good idea how i could make an index page that
> combines different apps. e.g. the results of a poll is shown as well
> as a news feed next to it.
>
> thanks
>
> stephane rufer
--~--~-~--~~~---~-
Make template tags for your various apps, and use them on the index
page :)
--~--~-~--~~~---~--~~
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@google
hi
does anyone have a good idea how i could make an index page that
combines different apps. e.g. the results of a poll is shown as well
as a news feed next to it.
thanks
stephane rufer
--~--~-~--~~~---~--~~
You received this message because you are subscribed
49 matches
Mail list logo