Re: migrations error

2017-03-20 Thread carlos
Hi, Camilo, yes of course, i see when create first 0001_initial.py files
this file import the models for third party
app, but when uninstall app i apply news migrations i think django
migration check all files i discover the import models for the third apps
not exit anymore and raise the error, for me maybe this error the
migrations a have put example:
initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-02-09 17:07
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
*import hitcount.models <- this apps i uninstall*
import sorl.thumbnail.fields
import taggit_autosuggest.managers

i create new migrations
0002_auto_numbers
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-03-17 09:46
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):
   

when i erase this third apps hitcount, in settings. py and uninstall with
pip,  I apply the new migrations this error raise:

RuntimeError: Model class hitcount.models.HitCount doesn't declare an
explicit app_label and isn't in an application in INSTALLED_APPS.

maybe is a logic bug the django migrations, because if I do not need an app
anymore I have to uninstall it!!

Or I'm confused???

cheers

On Mon, Mar 20, 2017 at 4:10 PM, Camilo Torres 
wrote:

> Hi,
>
> Do you have the virtual environment active when you run the migrate
> command?
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/45c81c1e-4127-42e7-8b2f-9e5e38cc7f68%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
att.
Carlos Rocha

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-7rO2cNmcY-P1EOdNz-x3aupRS4jrdaVZi0cYYAJuTiU566g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Connect to SQL server but error when migrations

2017-03-20 Thread max
I have the following question post on stackoverflow 
,
 
but no one can answer me.
Hope anyone who has experience on it, I appreciate 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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/504ff3f2-8356-4ba4-a281-762ace0768c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python / Django newbie looking for mentorship

2017-03-20 Thread Feria Científica
Thanks   a lot, I´ll start by the second,   greetings!

Richard

On Mon, Mar 20, 2017 at 2:03 AM, Mark Phillips 
wrote:

> Feria,
>
> Start here if you are comfortable with Pythonhttps://docs.
> djangoproject.com/en/1.10/intro/tutorial01/
>
> Start here if you are new to Python...https://www.
> codecademy.com/learn/python
>
> Both are hands on.
>
> Good luck!
>
> Mark
>
> On Sun, Mar 19, 2017 at 6:52 PM, Feria Científica <
> laferiacientif...@gmail.com> wrote:
>
>> I am a second year student of Electrical Engineering. I am a little bit
>> lost on where to start with Django/Python. I´d like to run programs to see
>> functions in action.  Where can I see codes??  Thanks
>>
>> Richard
>>
>> On Sun, Mar 19, 2017 at 7:12 PM, propellerhat > > wrote:
>>
>>> If you have 20 Years of experience as a software developer you can
>>> easily learn python by yourself in one or two weeks.
>>>
>>> There is a nice tutorial on the official Python website:
>>>
>>> > https://docs.python.org/3.6/tutorial/introduction.html
>>>
>>> You can ask beginner questions on the Python Tutor mailing list:
>>>
>>> > https://mail.python.org/mailman/listinfo/tutor
>>>
>>> For learning the Django framework, I can't really comment on it, because
>>> I'm a newbie myself. However I'm not planning to hire anybody to each me.
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/django-users/9d6b653e-0dc9-44c7-8c33-3cef42b77484%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/CALxdnWbzZ05Y2JYcp3M5Ds4Q6YEcMzLG2-
>> TWnPFuFPiK2RH82A%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAEqej2Mdtg7ezdCF%3D4_tgiFjoF%
> 3DwW%3DnK7PAZnd9-UA9cispmow%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALxdnWZ3n%2B%3DtMcr%3Dr5gNbxviTSkg%3DPkVqsJee32DNFb6LZ9D0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Testing a Django library

2017-03-20 Thread thauk
I am working on a Django library (which will be packaged) and want to set 
up testing for it. Looking at a number of existing Django libraries, here 
seem to be a number of ways to set up testing, and all of them are 
different.

Are there any best practices? Is there a guide that specifies how it should 
be done?

T

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/500f7758-2beb-4248-b316-912df984e57b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


migrations error

2017-03-20 Thread Camilo Torres
Hi,

Do you have the virtual environment active when you run the migrate command?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/45c81c1e-4127-42e7-8b2f-9e5e38cc7f68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: drop down multi checkbox with bootstraps selet

2017-03-20 Thread ايهاب توفيق
thank you for your help

بتاريخ السبت، 18 مارس، 2017 6:58:07 م UTC+2، كتب ايهاب توفيق:
>
> I am tring to create drop down checkbox with values from database   in my 
> templet using bootstrap select and form MultipleChoiceField like this 
>
>  
>
> Html
>
> select class="selectpicker" multiple>
>
> {% for topping in form.the_topping %}
>
> {{ topping.topping_id }}
>
>  
>
> {% endfor %}
>
> 
>
>  
>
> 
>
> $(document).ready(function() {
>
>   $('.selectpicker').selectpicker({
>
> style: 'btn-info',
>
> size: 4
>
> });
>
> });
>
> 
>
> Form.py
>
> *class *ProfileForm(forms.ModelForm):
> the_topping = 
> forms.ModelMultipleChoiceField(queryset=Topping.objects.all(), 
> required=*False*, widget=forms.CheckboxSelectMultiple)
>
> *class *Meta:
> model = Pizza
> exclude = [*'user'*]
>
>  
>
> the bootstrp working and the form is working but doesnot combined 
>
>  
>
> can any one help me PLS
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ef81db93-c69b-427c-bd0e-c69ec75bd9a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: No module named utils

2017-03-20 Thread Tim Graham
My guess it that the version of django-compressor you're using doesn't 
support Django 1.5 -- that's a rather old, insecure version. You'll either 
have to update to a supported version of Django (see 
https://www.djangoproject.com/download/#supported-versions) or use an old 
version of django-compressor that supports Django 1.5.

On Monday, March 20, 2017 at 12:19:48 PM UTC-4, Mark Knochen wrote:
>
> Hi,
>
> i have a Django Version 1.5.1 and Python Version 2.7.5 ... 
>
> No i get the error:
>
> Request Method: GET
> Django Version: 1.5.1
> Exception Type: ImportError
> Exception Value: 
>
> No module named utils
>
> Exception Location: /home/lib/python2.7/compressor/conf.py in , 
> line 5
> Python Executable: /home/lib/envs/bin/python
>
>
> I dont know, what can i do?
>
> Thank you for help
>
>
> Mark
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/260df838-9639-40d0-8f49-ee82c3ea8e0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Authentication via a different app on the same domain

2017-03-20 Thread Saman Ehsan
I have a django application with an API written using Django Rest 
Framework, and I want users to login with their account from another 
service. Since the service will be on the same domain as my application, is 
is possible to use cookie-based session authentication? Or do I need to use 
OAuth?

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9e61a0f7-7d14-4a5c-9af1-5a5e40038514%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No module named utils

2017-03-20 Thread Mark Knochen
Hi,

i have a Django Version 1.5.1 and Python Version 2.7.5 ... 

No i get the error:

Request Method: GET
Django Version: 1.5.1
Exception Type: ImportError
Exception Value: 

No module named utils

Exception Location: /home/lib/python2.7/compressor/conf.py in , 
line 5
Python Executable: /home/lib/envs/bin/python


I dont know, what can i do?

Thank you for help


Mark

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3f9991d1-5bb2-47b4-8858-288044a5e30e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


migrations error

2017-03-20 Thread carlos
Hi all,

When I install my first third party application in my model I create my
initial migration and everything okay, after that probe I uninstall that
application and create another new migration number 2, but it throws me an
error because there is no longer the application in both the Setting as
well as in my virtual environment.

This is a bug in migrations? i use django 1.10.x
when apply python manage.py migrate, this error it happens i say me, no
exist the application X
and the error is in 0001_initial.py line where import the packages tha no
longer exist

how to fix this error?

thx any helps

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-7rO1VJej%2Bjoh__0VH1dMk05r0w_WjD4Mb9ipF%2B7Owg14KZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: superuser having all permissions makes perm checking messy

2017-03-20 Thread guettli


Am Samstag, 18. März 2017 06:00:14 UTC+1 schrieb Melvyn Sopacua:
>
> On Thursday 16 March 2017 02:29:21 guettli wrote:
>
>  
>
> > In our custom code we already skip check1 and do only check2.
>
>  
>
> Why do you even do these checks?
>

Good question.

I want to get all users which have a given permission. 

Here is one implementation of it.  
https://code.djangoproject.com/ticket/18763

The resulting SQL uses several OUTER JOINS resulting in this issue: 
https://code.djangoproject.com/ticket/27260

We work-around it by serializing to IDs and then using the IDs in the next 
.filter() ... not nice but works.

Regards,
  Thomas Güttler






 

> There's a view decorator and class-based view mixin. All you need to do is 
> make good groups and users and the rest follows.
>
>  
>
> If you want to define a new permission type, you can do it in the model 
> meta class. Not one place requires manual permission checks - when you 
> stick to the model level.
>
>  
>
> If you need to enforce permissions at the model instance level, then don't 
> reinvent the wheel. There's a few packages out there, who have already 
> solved the problem - Django Guardian being one of them.
>
> -- 
>
> Melvyn Sopacua
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/32bf5e18-4f13-47f7-a1c6-d2162016a36a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Programming Error at admin

2017-03-20 Thread Melvyn Sopacua
On Saturday 18 March 2017 08:52:03 Andréas Kühne wrote:
> You shouldn't get any errors when running migrations. What I am
> guessing now is that the sessions table is missing completely or some
> of the columns in the table are missing.

But you would only be in that state, if the session migrations are in 
django_migrations and the tables removed afterwards.
So clearing the django_migrations table from entries with app='sessions' 
should recreate them, but you may get inconsistent history errors.

It's generally not pretty to use migrations and then hack the database. If 
you use migrations to alter your schema, you should always use 
migrations or be prepared to jump down the rabbit hole.
-- 
Melvyn Sopacua

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2920523.2ZJsQo3oRE%40devstation.
For more options, visit https://groups.google.com/d/optout.


Re: Meta class completely missing.

2017-03-20 Thread chris rose
hi brandon

try removing (object) from your meta class declaration

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/30d054d7-8150-4eeb-bc3b-cf8a762078ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Tweaking the admin title to display the model name

2017-03-20 Thread Andréas Kühne
Yes,

I actually have written an application where we use the django admin
interface as the primary work area for the client who uses the system.

We use a lot of specially written actions and widgets, but it is really
versitile. The only problem we have had was when we wanted to do
polymorphism and nested formsets. That was a bit hard to write :-)

Regards,

Andréas

2017-03-20 7:39 GMT+01:00 Derek :

> Good point; with some work (e.g. adding actions), the admin can cover 80
> to 90% of what most DB-focused projects will need - the django-suit
> interface also makes it look pretty slick!
>
> On Saturday, 18 March 2017 09:54:37 UTC+2, Andréas Kühne wrote:
>>
>> Yeah I know - the django admin platform is really great - add the
>> grappelli interface to it and you can use it as a proper backend for a
>> project. :-)
>>
>> Nice to see that I was able to push you in the right direction.
>>
>> Regads,
>>
>> Andréas
>>
>> 2017-03-17 23:22 GMT+01:00 Mike Dewhirst :
>>
>>> On 17/03/2017 7:49 PM, Andréas Kühne wrote:
>>>
 You can override the admin change form for the model you want and then
 change the title.

 You can check here for some information: https://docs.djangoproject.com
 /en/1.10/ref/contrib/admin/#overriding-admin-templates

>>>
>>> That's fantastic! Thanks Andréas ... here's the entire change in 2 lines:
>>>
>>> {% extends "admin/change_form.html" %}
>>> {% block title %}{{ original }}{% endblock %}
>>>
>>> :-)
>>>
>>> Cheers
>>>
>>> Mike
>>>
>>>
 Regards,

 Andréas

 2017-03-17 5:21 GMT+01:00 Mike Dewhirst >> mi...@dewhirst.com.au>>:

 Currently in an admin model change form, the admin page title is
 "Change "

 How can I tweak the code or the template so it displays an
 attribute of the model instance instead?

 I'm trying to work on a few instances at the same time and having
 the model instance identifier would be very useful.

 Thanks

 Mike



>> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/a9875e7c-0e7a-4fca-b88c-1f72fb3c5cf7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCfOU8QKxH7yMPLh1VspX-QMLUo4mL_kF6YZ55qDdKPt3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: GeoDjango

2017-03-20 Thread Jani Tiainen

Hi,

There are several options how to actually server maps.

Few simplest options are running seperate server that serves maps like 
MapServer, GeoServer or Mapnik.


Of course if you want to serve maps from Django directly that maybe tricky.

That django-wms package seems to leverage MapServer mapscript to publish 
maps. Not sure how mature that project is.


On 18.03.2017 14:51, Samuel Brunel wrote:

Hello,

I’m new on GeoDjango, I need to known If I can use GeoDjango as  WMS ?

Best regards,

Samuel



--
Jani Tiainen

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dfe6ce2f-ef29-1016-e04e-0d257a4b59d5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: GeoDjango

2017-03-20 Thread Derek
One option is to use Geoserver on the backend to manage your spatial data 
(in files or databases), and then to serve this via Django.

See:
https://www.youtube.com/watch?v=rU_Jh6RcY24


On Saturday, 18 March 2017 15:21:55 UTC+2, sbrunel62 wrote:
>
> Hello, 
>
> I’m new on GeoDjango, I need to known If I can use GeoDjango as  WMS ? 
>
> Best regards, 
>
> Samuel 
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/07b5677c-0a48-4494-bd43-73d021c40e86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python / Django newbie looking for mentorship

2017-03-20 Thread Antonis Christofides
> If you have 20 Years of experience as a software developer you can easily
> learn python by yourself in one or two weeks.

Of course he can. However a teacher is a huge boon, for various reasons, and if
you have a little more money than time it's really a good idea to get one.

If someone is experienced in C or Delphi, for example, their first Python code
looks like this:

for i in range(alist):

do_something(alist[i])


Unlearning the C idioms and learning the Python ones is much faster and much
easier with a teacher.

Regards,

A.

Antonis Christofides
http://djangodeployment.com


On 03/20/2017 12:12 AM, propellerhat wrote:
> If you have 20 Years of experience as a software developer you can easily
> learn python by yourself in one or two weeks.
>
> There is a nice tutorial on the official Python website:
>
> > https://docs.python.org/3.6/tutorial/introduction.html
>
> You can ask beginner questions on the Python Tutor mailing list:
>
> > https://mail.python.org/mailman/listinfo/tutor
>
> For learning the Django framework, I can't really comment on it, because I'm a
> newbie myself. However I'm not planning to hire anybody to each me.
> -- 
> 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+unsubscr...@googlegroups.com
> .
> To post to this group, send email to django-users@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9d6b653e-0dc9-44c7-8c33-3cef42b77484%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d1ba416e-6232-8f6e-ccb5-fa6cd03849d0%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.


Re: Tweaking the admin title to display the model name

2017-03-20 Thread Derek
Good point; with some work (e.g. adding actions), the admin can cover 80 to 
90% of what most DB-focused projects will need - the django-suit interface 
also makes it look pretty slick!

On Saturday, 18 March 2017 09:54:37 UTC+2, Andréas Kühne wrote:
>
> Yeah I know - the django admin platform is really great - add the 
> grappelli interface to it and you can use it as a proper backend for a 
> project. :-)
>
> Nice to see that I was able to push you in the right direction.
>
> Regads,
>
> Andréas
>
> 2017-03-17 23:22 GMT+01:00 Mike Dewhirst  >:
>
>> On 17/03/2017 7:49 PM, Andréas Kühne wrote:
>>
>>> You can override the admin change form for the model you want and then 
>>> change the title.
>>>
>>> You can check here for some information: 
>>> https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#overriding-admin-templates
>>>
>>
>> That's fantastic! Thanks Andréas ... here's the entire change in 2 lines:
>>
>> {% extends "admin/change_form.html" %}
>> {% block title %}{{ original }}{% endblock %}
>>
>> :-)
>>
>> Cheers
>>
>> Mike
>>
>>
>>> Regards,
>>>
>>> Andréas
>>>
>>> 2017-03-17 5:21 GMT+01:00 Mike Dewhirst >>  >:
>>>
>>> Currently in an admin model change form, the admin page title is
>>> "Change "
>>>
>>> How can I tweak the code or the template so it displays an
>>> attribute of the model instance instead?
>>>
>>> I'm trying to work on a few instances at the same time and having
>>> the model instance identifier would be very useful.
>>>
>>> Thanks
>>>
>>> Mike
>>>
>>>
>>>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a9875e7c-0e7a-4fca-b88c-1f72fb3c5cf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.