Ok that makes sense.
Now I have something like this
class modelStudentAdmin(admin.ModelAdmin):
form = modelStudentAdminForm
#Only display students that belong to this user
def get_queryset(self, request):
qs = super(modelStudentAdmin, self).get_queryset(request)
if r
Does not appear to be fixed in Django 1.11a1.
On Monday, January 23, 2017 at 7:31:22 PM UTC-6, Tim Graham wrote:
>
> Could you check with Django 1.11a1? This might be fixed in
> https://code.djangoproject.com/ticket/27584.
>
> On Saturday, January 21, 2017 at 6:02:27 PM UTC-5, Connor Boyle wrote:
I am not sure if i understand this are you suggesting that i return a form
instead of a queryset ?
--
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
On Saturday 28 January 2017 18:21:34 Mike08 wrote:
> now my question is in the admin when the user attempts to create a new
> modelStudent for the field "user" all available users are shown in
> the drop down. My question is if there is a way for me to
> limit/restrict that drop down to a certain
I currently have a model that looks like this
class modelStudent(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE,null=True,
blank=True)
school = models.ForeignKey(modelSchool)
Now I also have a modelStudentAdmin of the above model which basically
filt
Hello,
I'm having a hard time figuring out both from docs and code what the best
strategy is
for preventing a loop, if in post_save() you need to save the provided instance.
I'm implementing an ImageField that is able to handle multiple arbitrary
thumbnail
images.
For that purpose I've regis
How you render your formset.
You can add separator in your html template:
example:
{% for form in formset.forms %}
{{ form.as_p }}
{% if not forloop.last %}
{% endif %}
{% endfor %}
W dniu sobota, 28 stycznia 2017 15:08:00 UTC+1 użytkownik Jeroen van
Oorschot napisał:
>
Hi everyone.
I created small application which can execute python code in django project
environment.Maybe someone will be interested and has any suggestions.
django-admin-shell:
https://github.com/djk2/django-admin-shell
--
You received this message because you are subscribed to the Google Gro
Did you install debug_toolber on your server?
pip install django-debug-toolbar
On 1/28/17, Richard Jackson wrote:
> Hi everyone,
>
> I've recently installed the Django Debug Toolbar for local use; I've just
> pushed the code online and am greeted with the below error:
>
> [81.95.157.172] out: Tr
Many thanks to you all guys, I will follow this path.
Alan
On 27 January 2017 at 22:05, bobhaugen wrote:
> I agree with all the advice to go a step at a time.
>
> Here's a bunch of clues and chatter in github issues about how we upgraded
> from 1.4 to 1.8, one minor version at a time.
> https:/
Hi everyone,
I've recently installed the Django Debug Toolbar for local use; I've just
pushed the code online and am greeted with the below error:
[81.95.157.172] out: Traceback (most recent call last):
[81.95.157.172] out: File "", line 1, in
[81.95.157.172] out: File
"/home/rjackson87/.v
On Sat, Jan 28, 2017 at 04:33:47AM -0800, Jeroen van Oorschot wrote:
> Hi,
> I'm using a
> modelformset_factory()
>
> for displaying a form multiple times automatically. This works perfect.
>
> I would like to have some kind of separator between the individual forms in
> the page. Now the forms
I do not think that
"Each view is responsible for doing one of two things: Returning an
> HttpResponse object containing the content for the requested page, or
> raising an exception such as Http404. The rest is up to you."
>
is easy for a beginner to understand. Also the tutorial directly ask
> A quick one is e.g. that there is no explanation of what a view is and what
>
> its purpose is.
"The code above maps URLs, as simple regular expressions, to the
location of Python callback functions (“views”)"
"Each view is responsible for doing one of two things: Returning an
HttpResponse obje
If I could I would gladly rewrite the tutorial. But sadly I do not have
enough time to do so.
However I think it is bad since it not only completely disregards the zen
of py but also its own principles (DRY etc.) If you need concrete examples
I can name you tons.
A quick one is e.g. that there
I am looking for a way to get detailed profiling information (line-level
timing) for custom Django admin functions - especially actions.
All the various guides and blog posts seem to deal with adding profiling
(e.g. via decorators) to plain Django views, and nothing at all deals with
this aspect o
Hi,
I'm using a
modelformset_factory()
for displaying a form multiple times automatically. This works perfect.
I would like to have some kind of separator between the individual forms in
the page. Now the formsetfactory just shows all forms after eachother, and
it can be quite hard too see whi
The error should give some information on what is going wrong and how to fix it
2017-01-27 23:25 GMT+01:00 ايهاب توفيق :
>
> Thank you for your reply and I try the fixed model but the problem with the
> view that I use to store the files from templets to the db I followed the
> django documents as
18 matches
Mail list logo