Re: NameError "SignUpAdmin"

2014-01-03 Thread Eddie29
Thank you so much! I will post regular code in future for simple fixes. Thanks again, Eddie :) On Friday, January 3, 2014 5:53:57 PM UTC+8, Daniel Roseman wrote: > > On Friday, 3 January 2014 03:02:30 UTC, Eddie29 wrote: >> >> Hi Guys, >> I am really new to Django and Python. I have recently sta

ForeignKey pointing to "nothing"

2014-01-03 Thread Phil Hughes
I have a model where a foreign key reference may be undefined when a record is first created. In particular, I have the following in my model seller = models.ForeignKey(User, related_name='+', blank=True, null=True) The form accepts not setting the seller field but I get an Integrity Error

Re: Why 'break' in BaseHandler.get_response() self._view_middleware loop?

2014-01-03 Thread Nikolas Stevenson-Molnar
That follows the stated behavior for "process_view" middleware: https://docs.djangoproject.com/en/1.6/topics/http/middleware/#process_view process_view is called before the request is passed on to the view function/class. The view is expected to return a response, so the only reason that the middl

Populating textarea from one page to another

2014-01-03 Thread Pablo Garcia
Hello, I have an application, in which i create a link, that opens to another page within the app. In the link i have an element called "notes" and the link url goes something like ¬es=thenote&mcc_id=123& When I click on that link with that url, the "notes" textarea field, doesn't get

Why 'break' in BaseHandler.get_response() self._view_middleware loop?

2014-01-03 Thread jeremiahsavage
Hello, I was wondering why there is a break in this code? for middleware_method in self._view_middleware: response = middleware_method(request, callback, callback_args, callback_kwargs) if response: break The reason

Filtering out results in Automatic Managers

2014-01-03 Thread Shubham Jain
Hi, In https://docs.djangoproject.com/en/dev/topics/db/managers/#do-not-filter-away-any-results-in-this-type-of-manager-subclass, it is written that "A manager that filters results in get_queryset() is not appropriate for use as an automatic manager." Can you please tell me why is it not appr

Re: Django GenericRelation not working

2014-01-03 Thread arthur . muchir
Thanks Daniel for your answer. I didn't know I could use a simple FK in this case. I will try using it. I didn't want to directly inherit from GenericMedia because I don't want to merge ContentType datas (content_type, content_object, etc.) with my own Media datas (description, link, ...) So f

Re: Django GenericRelation not working

2014-01-03 Thread Daniel Roseman
On Thursday, 2 January 2014 21:09:22 UTC, arthur...@gmail.com wrote: > > I have the following model in my app, using the content-type django > framework in version 1.6.1 : > > class GenericMedia(models.Model): > limit = models.Q(model = 'Image') | models.Q(model = 'Video') | > model

Re: NameError "SignUpAdmin"

2014-01-03 Thread Daniel Roseman
On Friday, 3 January 2014 03:02:30 UTC, Eddie29 wrote: > > Hi Guys, > I am really new to Django and Python. I have recently started learning > them from a course on Udemy and I got stuck on the first example, making a > web app. I'm not sure what I have done wrong but when I run my Django > ser