Re: staticfiles ManifestStaticFilesStorage and Form Media

2015-12-07 Thread Brian Neal
Thank you Denis. I will keep my eye on this ticket: https://code.djangoproject.com/ticket/21221 Best, BN On Monday, December 7, 2015 at 12:42:23 AM UTC-6, Denis Cornehl wrote: > > Hi Brian, > > a sidenote, this will be fixed: > https://github.com/django/django/pull/5571 > > -- > Denis > > Am

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread knbk
> > It seems a bit weird that that's not automatic. > That's what I thought, so it's automatic in 1.9. That still leaves the question of what Model.get_absolute_url() should do, > given that it has no way to get the current app that I can see. Thank you > for your very helpful comments though.

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread Jon Ribbens
On Monday, 7 December 2015 23:40:51 UTC, knbk wrote: > Namespaces are a mess, and have been for a while. 1.9 cleans this up a > bit. Some advice for 1.8 to stay in line with the 1.9 changes: > >- Always define an application namespace when using an instance >namespace. >- An app shou

Template can't find image file

2015-12-07 Thread Gary Roach
While I'm working with "Tango with Django" I am using Django 1.8 and Python 3.4 (debian linux). My project tree (somewhat truncated) is in the /root directory and looks as follows: tango ├── bin ├── include ├── lib └── tango ├── db.sqlite3 ├── __init__.py ├── manage.py ├── ran

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread knbk
Namespaces are a mess, and have been for a while. 1.9 cleans this up a bit. Some advice for 1.8 to stay in line with the 1.9 changes: - Always define an application namespace when using an instance namespace. - An app shouldn't depend on the project's url configuration, so always us

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread Jon Ribbens
On Monday, 7 December 2015 21:14:45 UTC, Caique Reinhold wrote: > > Well, as this is implemented you have to know your namespaces during > development. But now i see what's your problem. > > I'm not sure, but i don't think it is encouraged to have multiple > instances of the same app in one proje

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread Caique Reinhold
Well, as this is implemented you have to know your namespaces during development. But now i see what's your problem. I'm not sure, but i don't think it is encouraged to have multiple instances of the same app in one project. I think the sites

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread Jon Ribbens
On Monday, 7 December 2015 20:09:34 UTC, Caique Reinhold wrote: > > You use the app namespace which you defined in the site for each app, not > the app_name. That's what pa xapy meant. > > In the example you gave it would be like: reverse('author-polls:view', > self.id). > But (a) the app cannot

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread Caique Reinhold
You use the app namespace which you defined in the site for each app, not the app_name. That's what pa xapy meant. In the example you gave it would be like: reverse('author-polls:view', self.id). On Monday, December 7, 2015 at 8:57:41 AM UTC-2, Jon Ribbens wrote: > > On Monday, 7 December 2015

Re: am new to django and at a dead end or so i think

2015-12-07 Thread Andrew Farrell
(moving back on-list so that others can jump in to help) Short answer: check in settings.py to make sure that INSTALLED_APPS doesn't list the same app name twice. -- Okay, this is different! We tried to "stimulate the error" *, and we've found that on closer inspection that the same SyntaxE

PgConf.US CFP

2015-12-07 Thread Joshua D. Drake
Hey folks, The CFP for PgConf.US is now open for 2016 It would be awesome to see some Django Talks! http://www.pgconf.us/2016/submit/ JD -- Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564 PostgreSQL Centered full stack support, consulting and development. Announcing "I'

Re: Problem with appending slash at the end of the url

2015-12-07 Thread Carsten Fuchs
Hello, Am 07.12.2015 um 13:37 schrieb Dongwon Kang: I don't know even it's a problem, but anyway, I just updated django 1.8.7 to django 1.9 and found application isn't working. I found out django wasn't redirecting not-slashed url. it returns 500 error if slash hadn't been at the end of the u

Re: SubfieldBase deprecation

2015-12-07 Thread Simon Charette
Hi Matus! > Is there any replacement to this / what is the best way to do it if I'd like > to call to_python on assignment? If you'd like to have a field's `to_python()` called on assignement you should attach a descriptor[1] on the model class on `contribute_to_class()` that calls it. e.g.

Re: Problem Working with forms.Form

2015-12-07 Thread Teddy McZieuwa
Thank you very much, I was able to use ModelForm with widgets...Thanks! -- 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

instructions to make DATE PICKER work in django

2015-12-07 Thread Sid
Hi all, > > *Problem:* > I have a data set which shows on web page using django and another webpage > consists of datepicker > > > > *code:(views.py)* > def about(request): > #change the f

Problem with appending slash at the end of the url

2015-12-07 Thread Dongwon Kang
Hi I'm newbie here and I just wonder if I can ask some question here. I don't know even it's a problem, but anyway, I just updated django 1.8.7 to django 1.9 and found application isn't working. I found out django wasn't redirecting not-slashed url. it returns 500 error if slash hadn't been at

Django User Model one-to-one with other model and Forms

2015-12-07 Thread Emad Mokhtar
I want to create a model for teachers and he will has a user to login to the system. I implemented this by one-to-one relation between Teacher model and User model, but I can't get my head around making a form for Teacher model and in the same time I want to create user for him/her, please not

Re: Drop and replace SQL Table automatically when Model is migrated

2015-12-07 Thread Jani Tiainen
Django has built-in support for database migrations since version 1.7. In normal conditions you should be using at least version 1.8 (LTS, and lowest version supported now). On 07.12.2015 03:48, Alexander Whatley wrote: I will check with the people who made the IDE. Thanks for the input. On S

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread Jon Ribbens
On Monday, 7 December 2015 10:24:48 UTC, pa xapy wrote: > > there is two approaches: > you can either create unique names for each url pattern entry like > url(, name='my_app_unique_view_name') > or use namespace and pass it to reverse like > reverse('my-app-namespace:my-url-pattern-view-name

Re: How to write Model.get_absolute_url()?

2015-12-07 Thread pa xapy
there is two approaches: you can either create unique names for each url pattern entry like url(, name='my_app_unique_view_name') or use namespace and pass it to reverse like reverse('my-app-namespace:my-url-pattern-view-name') On Sunday, December 6, 2015 at 3:29:29 AM UTC+3, Jon Ribbens wro

Re: Need a Tutorial

2015-12-07 Thread Davron
Thanks folks for your replies. I think I mistyped when I was asking for a links to "python-tutoria"' instead of "django-tutorial" so, If anybody still don't mind to help me out, please, send me some links which are public . For instance, I had stared my python learning with a great public cours