Rendering Form Fields That Are Passed To Context Inside Of An Object

2016-04-08 Thread David McWilliams
tl:dr -- How do I explicitly render the fields in a form that's passed to the context dictionary within an object? I'm building a page right now that shows a list of documents to the user. Each document has a type, a status, a list of images associated with it, and finally a document update fo

Re: Multidimensional form requirements

2016-04-08 Thread Babatunde Akinyanmi
I don't know if I'm off target but. I'm presently work on something like this where I have have to save three models at a go. One model is a stand alone while the other two have a foreign key to the stand alone model which is a many to one relationship. So to implement the many to one where I

Re: inventory in Django

2016-04-08 Thread Daniel Wilcox
> > Sorry if this question seems basic, but I'm having trouble figuring out > the best way to approach this on a high level. > > I'm at the beginning stages of building an ecommerce site,. Inventory > changes regularly, and photos and descriptions need to be easy to update > for my client. Is this

Re: How to know which models have changed and need make migrations?

2016-04-08 Thread C. Kirby
Are you sure you are adding your new migrations to your source control? It sounds like the model changes are being correctly commited but the generated migrations are not. On Friday, April 8, 2016 at 11:17:16 AM UTC-5, Neto wrote: > > I know, but in production is showing the message that I have

Re: Django 1.9 Woes

2016-04-08 Thread SillyInventor
I don't think so... The line I am getting hung up on is: class Project(models.Model): .. def approved_projects(): return Project.objects.filter(approved=True) It seems that no matter how many things I remove from my URLs, if there is any reference to any model on the first build,

Re: How to know which models have changed and need make migrations?

2016-04-08 Thread Neto
I know, but in production is showing the message that I have to do makemigrations. I need a command to know what models need to makemigrations Em quinta-feira, 7 de abril de 2016 14:50:54 UTC-3, Daniel Roseman escreveu: > > You shouldn't ever need to make migrations in production. You make them i

Multidimensional form requirements

2016-04-08 Thread Scot Hacker
I need to build a pretty complex / non-standard form and am looking for advice on the overall architecture. Consider the following models: class UserProfile(User): ... standard set of fields class ProfileExtra(): ForeignKey(UserProfile) extratype (e.g. skill, work experience, website, pub

What Python/Django code checkers do you recommend?...

2016-04-08 Thread Fred Stluka
Python/Django programmers, What code review tools do you use?  Do you run them automatically when checking in new code?  Do you recommend them? Details: I'm working on a large Python/Django Web app (1,000 files, 200,000 lines of code, 3.5 years) and spe

Re: I might need a different control panel... or do I?

2016-04-08 Thread Alex Heyden
The ability to update a profile can be as simple as a form for the model object that holds the profile. The company's employees would have access to Django admin. I've never used it personally, but django-user-accounts looks like a way to avoid making a registration form if that's important to you.

inventory in Django

2016-04-08 Thread Becka R.
Hi, Sorry if this question seems basic, but I'm having trouble figuring out the best way to approach this on a high level. I'm at the beginning stages of building an ecommerce site,. Inventory changes regularly, and photos and descriptions need to be easy to update for my client. Is this an a

I might need a different control panel... or do I?

2016-04-08 Thread Andrew Chiw
I'm making a Django site for a company, and the way I envision it working is this: The company's employees can manage and validate clients who sign up on the site as well as link them to other services. Once the clients login, they have their own little control panel where they can change their

Should I use Django's builtin control panel for user facing purposes?

2016-04-08 Thread Andrew Chiw
I'm making a Django website for a company, where the company's employees will validate clients that sign up. I'm thinking that the clients should have a mini control panel where they can change their own information only, while the company's employees have their own control panel where they can

Re: Dedicated pages for specific group members

2016-04-08 Thread Luis Zárate
Admin site is a great example of how to do that. But in general you can use in the view if not request.user.has_perm("app name.perm name): Raise error like 404 or redirect to login I think decorator is provide by django. El jueves, 7 de abril de 2016, Larry Martell escribió: > On Thu,

Django get user details while registration for admin approval

2016-04-08 Thread Sudhanshu Shekhar
I am creating a Django app for which I want to be able to approve users before letting them login to the site. Am using django-user-accounts from pinax for the same. This approval step requires users to submit additional information such as their qualifications etc. This information should be a

Re: Django 1.9 Woes

2016-04-08 Thread Tim Graham
Difficult for me to say for sure without having a sample project to debug. Do you know if you have any module level queries in your project? Those are generally to be avoided and may cause problems like this. See https://groups.google.com/d/topic/django-developers/7JwWatLfP44/discussion for som

Re: Relation fields do not support nested lookups'

2016-04-08 Thread Jonty Needham
Sent too soon! def calculate_score(self): return x.m2m_set.filter(condition).aggregate(avg=Avg('m2m_subfield__score'))['avg'] returns the "Relation fields do not support nested lookups" error On Fri, Apr 8, 2016 at 11:27 AM, Jonty Needham wrote: > I'm not sure what this error means or how

Relation fields do not support nested lookups'

2016-04-08 Thread Jonty Needham
I'm not sure what this error means or how to resolve it. I'm guessing it's because in my model I'm trying to assign a field to the value of the average of all the many2many's from another field. But I can do this at the command line happily, yet when I put it on a submethod I can't do it, so I don'

How to use memcache with the queryset of the popup window of a raw field?

2016-04-08 Thread Victor
Under Django 1.9.5 and admin I'm developping an application "myapp" of which below you can see a simplified complete version. Focusing on the OrderOption ModelAdmin its inline OrderDetailinline has a raw_id_field related to the model Item. Now, when I click on the magnifying lens close to t

Re: Problems with dumpdata/loaddata

2016-04-08 Thread Ramiro Morales
It shouldn't. Are you sure you haven't opened and saved the json file with a text editor that might be adding the BOM, e.g. Notepad before running loaddata? On Apr 7, 2016 9:17 PM, wrote: > Opening the JSON file in Notepad++ certainly gives some insight... It says > it's encoded in USC-2 LE BOM.