Re: Re: Migration of auth.user to custom user

2017-08-09 Thread Mike Dewhirst
On 7/08/2017 11:55 PM, Tim Graham wrote: Some steps are outlined in https://code.djangoproject.com/ticket/25313. OK thanks Tim. I'll start the planning. I'll presume Django 1.10 isn't sufficiently different from 1.8 for which the instructions are written. I wish I wasn't an underconfident wu

Re: How to Minify, obfuscate, and compress django code

2017-08-09 Thread Bernd Wechner
I'm a little confused as to what this has to do with Django, which runs server side. The code it emits to the client is limited to what you put in your templates, including perhaps the widgets that django provides for forms. I use a lot of javascript in my forms, and it's my responsibility to m

Re: How to Minify, obfuscate, and compress django code

2017-08-09 Thread Mike Dewhirst
Have a look in __py cache__ Connected by Motorola hin Account wrote: >Hi All, > >I am developing one products using the django framework.  I don't to share the >my source code with the client. I just want to share the obfuscated code with >client. Please tell me how to do the same in django? 

[Solved] Re: database tables are not being created

2017-08-09 Thread jjanderson52000
Andreas, Thank you for the help. It turned out my __init__.py file was missing in my migration directories. Once added, everything ran great. Jim On Monday, August 7, 2017 at 3:33:18 PM UTC-4, jjander...@gmail.com wrote: > > > I have been working on a django application for several months, lea

Error rendering template ==> raise KeyError (key) KeyError: 'address_inline'

2017-08-09 Thread Elias Coutinho
Good afternoon people, I'm trying to render a template with django-material I am getting the error message in the template as below: And the complete traceback i

Re: How to handle nested backward lookups in a template for a generic detail view?

2017-08-09 Thread Александр Христюхин (roboslone)
You still can reference the data: class Foo(models.Model): pass class Bar(models.Model): foo = models.ForeignKey(Foo, related_name='bars') f = Foo() b1 = Bar(foo=f) b2 = Bar(foo=f) f.bars.all() # > On 9 Aug 2017, at 18:19, Thomas Hughes wrote: > > Thank you for your reply. > > I

Re: Channels vs Django-websocket-redis

2017-08-09 Thread John Byrne
Thanks for the reply. I didn't realize that ws4redis doesn't have the concepts of consumers and routing. That's something I'll have to look into further. The documentation for ws4redis isn't great so that makes it harder. On Saturday, August 5, 2017 at 9:19:24 AM UTC-4, Artem Malyshev wrote: >

Re: Deploy Django on Apache server

2017-08-09 Thread Andréas Kühne
2017-08-09 9:01 GMT+02:00 Akshay Jagirdar : > Hi Guys, > > Please help me with deployment of Django project on Apache server. > > My System environment... > > OS : Fedora 20 > Python : 2.7 > Django : 1.11 > Apache: 2.4 > > What I know is i have modify httpd.conf file in > /etc/httpd/conf/htt

How to Minify, obfuscate, and compress django code

2017-08-09 Thread hin Account
Hi All, I am developing one products using the django framework. I don't to share the my source code with the client. I just want to share the obfuscated code with client. Please tell me how to do the same in django? -- You received this message because you are subscribed to the Google Group

Deploy Django on Apache server

2017-08-09 Thread Akshay Jagirdar
Hi Guys, Please help me with deployment of Django project on Apache server. My System environment... OS : Fedora 20 Python : 2.7 Django : 1.11 Apache: 2.4 What I know is i have modify httpd.conf file in /etc/httpd/conf/httpd.conf, please help me with this. Thanks, Akshay Jagirdar --

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread Vijay Khemlani
https://django-guardian.readthedocs.io/en/stable/userguide/check.html#get-objects-for-user projects = get_objects_for_user(request.user, 'projects.view_project') On Wed, Aug 9, 2017 at 10:55 AM, guettli wrote: > > > Am Mittwoch, 9. August 2017 10:04:25 UTC+2 schrieb James Schneider: > >> >> >>

Re: How to handle nested backward lookups in a template for a generic detail view?

2017-08-09 Thread Thomas Hughes
Thank you for your reply. I understand your third point. In this application though I have a many images to a single detail structure. For your first point "use `related_name` in your model fields to get pretty backref names (so you don't have to use image_set everywhere)", how do I do that a

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread guettli
Am Mittwoch, 9. August 2017 10:46:10 UTC+2 schrieb James Schneider: > > Sorry for the duplicate, accidently hit send before I was done, finished > below. > > On Aug 3, 2017 1:08 AM, "guettli" > wrote: > > First I asked a similar question on the postgresql-general list. The > discussion[1] has s

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread guettli
Am Mittwoch, 9. August 2017 10:04:25 UTC+2 schrieb James Schneider: > > > > On Aug 3, 2017 1:08 AM, "guettli" > wrote: > > First I asked a similar question on the postgresql-general list. The > discussion[1] has settled there. > > Now I would love the hear what you think. > > > I am thinking abo

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread guettli
Am Montag, 7. August 2017 14:48:54 UTC+2 schrieb Vijay Khemlani: > > I use django-guardian for object level permissions and it works > surprisingly well > Good to hear this. I will have a look at it. > > On Mon, Aug 7, 2017 at 4:59 AM, Antonis Christofides < > ant...@djangodeployment.com > w

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread guettli
Am Montag, 7. August 2017 09:55:45 UTC+2 schrieb Mike Morris: > > I have no expertise in the field, but I've chosen not to let that stop me > from making a suggestion :-) > > How about splitting the difference: > >1. Assign & track permissions on the application side, then >2. Pass the

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread guettli
Am Montag, 7. August 2017 09:43:00 UTC+2 schrieb Andréas Kühne: > > Hi, > > I understand your concern, however I would like to learn more about how > you intend to solve the problem. The only way I could see a solution would > be to change the database user depending on which application user i

Re: How to handle nested backward lookups in a template for a generic detail view?

2017-08-09 Thread Александр Христюхин (roboslone)
Whoops, looks like all dots are in place, my mistake. First and last points are still valid, though. > On 9 Aug 2017, at 16:08, Александр Христюхин (roboslone) > wrote: > > Hi, > > First of all, you can use `related_name` in your model fields to get pretty > backref names (so you don't have

Re: How to handle nested backward lookups in a template for a generic detail view?

2017-08-09 Thread Александр Христюхин (roboslone)
Hi, First of all, you can use `related_name` in your model fields to get pretty backref names (so you don't have to use image_set everywhere). Second, you're missing dots in your template (`for detail in project.projectdetail_set.all`). And finally, your model is called ProjectDetailImage and

Re: How to handle nested backward lookups in a template for a generic detail view?

2017-08-09 Thread Thomas Hughes
Just FYI - the issue was with using 'image.url' rather than 'image.image.url' in code labeled with 'do something with image' in the HTML template above. On Monday, August 7, 2017 at 3:52:15 PM UTC-4, Thomas Hughes wrote: > > I have a generic detail view serving content for 'project' to an HTML

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread James Schneider
Sorry for the duplicate, accidently hit send before I was done, finished below. On Aug 3, 2017 1:08 AM, "guettli" wrote: First I asked a similar question on the postgresql-general list. The discussion[1] has settled there. Now I would love the hear what you think. I am thinking about rewritin

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread Antonis Christofides
> middle that runs very early middleware Antonis Christofides http://djangodeployment.com On 2017-08-09 11:15, Antonis Christofides wrote: > > Hi, > >> - You'll almost certainly take a performance hit when connecting to the >> database. If each connection to the DB is using a different user, then

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread Antonis Christofides
Hi, > - You'll almost certainly take a performance hit when connecting to the > database. If each connection to the DB is using a different user, then you > likely cannot take advantage of things like DB connection pooling. Every > request would require that a connection be built, utilized, and th

Re: Row based permissions: In DB or App? ... farewell pain

2017-08-09 Thread James Schneider
On Aug 3, 2017 1:08 AM, "guettli" wrote: First I asked a similar question on the postgresql-general list. The discussion[1] has settled there. Now I would love the hear what you think. I am thinking about rewriting an existing application which uses PostgreSQL via Django. Up to now the permis

User to UserProfile access problem

2017-08-09 Thread Mike Dewhirst
Using Django 1.10 Admin with a legacy contrib.auth.user plus 1:1 userprofile It works fine but I'm having trouble letting the user adjust their name and email address in contrib.auth.user. Additionally, I reveal some of the user profile fields as an Admin inline under the Company model for us