Best way to structure a django project with multiple levels of sub apps?

2017-08-17 Thread Alexander Joseph
I'm bullding a larger django project and I'm starting to implement cookiecutter django after reading through "2 Scoops of Django" but still have some questions on structuring a project. I've setup my project, we'll call it 'business_proj'. In business_proj I started an app called

Re: A lot of Problems with Migrating (conceptual)

2017-08-17 Thread Alexander Joseph
Thanks Antonis, and great post on production databases. I'll definately be switching to postgresql. I come from php/xamp and I liked the MySQL GUI with phpMyAdmin so I've gravitated towards MySQL since. On Thursday, August 17, 2017 at 2:05:44 PM UTC-6, Antonis Christofides wrote: > > Hello,

Re: A lot of Problems with Migrating (conceptual)

2017-08-17 Thread Antonis Christofides
Hello, My opinion is that you should definitely switch to PostgreSQL, although I'm not aware whether this would make migrating easier. I've written a relatively long post about which database to choose in

Re: Query for retrieving the latest of a related row.

2017-08-17 Thread Jani Tiainen
Hi. Actually your way is pretty much only way to do it. With aggregation you can get latest post timestamp per forum but to get actual post requires second query. Also unless you list hundreds of forums per page performance shouldn't be a problem. Note that you could use reverse relation to

Re: Migrations don't create tables

2017-08-17 Thread Matej Tacer
That worked. Thank you, Dylan! > On Aug 17, 2017, at 3:08 PM, Dylan Reinhold wrote: > > Add the app name to the end of makemigrations. > > Seems like the first time an app is added you have the force makemigrations > to find it. > > Dylan > > > On Aug 17, 2017 11:58

Re: Migrations don't create tables

2017-08-17 Thread Dylan Reinhold
Add the app name to the end of makemigrations. Seems like the first time an app is added you have the force makemigrations to find it. Dylan On Aug 17, 2017 11:58 AM, "matejrpls" wrote: > Hi, I have created a > 1. new app in django > 2. added the new app to to

Migrations don't create tables

2017-08-17 Thread matejrpls
Hi, I have created a 1. new app in django 2. added the new app to to installed apps in settings.py 3. created a few models in the app models.py then, I ran python manage.py "makemigrations" and "migrate" however, django did not detect any changes in models and did not create any

Re: JavaScriptCatalog: it's big or not?

2017-08-17 Thread Stanislav
Tim, thanks for the answer! I asked this question on the stackoverflow and other forums but no one knows the answer. I just started to learn django and python and It is still difficult for me to understand нow to apply this test to my code. I tried to run the django test

Query for retrieving the latest of a related row.

2017-08-17 Thread mli...@x76.eu
Hi, I have a Forum-table and a related Post-table. In my "overview"-view I display a list of all the latest posts for each forum. My current solution goes something like this: posts = [] for f in Forum.objects.all().order_by('name') : posts +=

A lot of Problems with Migrating (conceptual)

2017-08-17 Thread Alexander Joseph
I'm pretty new to django and I've been having problems with makemigrations/migrate and I wonder if Im doing things right. I'm using MySQL backend and after reading in the documentation a little it sounds like Postgresql might make migrating more painless. Usually my problems stem from changing

How to correctly subclass the 'PasswordResetConfirmView' view

2017-08-17 Thread 'disp' via Django users
I have subclassed the view PasswordResetConfirmView because I want to pass in my own form, however, I keep getting the following error: Sometimes the error

Notre Dame seeking FS Developer: a problem solver, a dreamer

2017-08-17 Thread Terri Hall
Are you someone driven by the challenge of creating tools to solve problems, and a desire to make things better and more efficient? If you consider yourself a thinker, a dreamer, a problem solver, and a visionary, then read on. Notre Dame Research (NDR) is adding a full stack developer to our

Re: How to prevent the use of hidden fields in a form

2017-08-17 Thread Jani Tiainen
Hi. Of course you don't use hidden field value at all from the form (you shouldn't even have those values there in the first place). Get and set id and date after you have validated form otherwise to final object so there isn't any possibility to even try to change to value On 17.8.2017

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

2017-08-17 Thread Vijay Khemlani
How can we propose faster alternatives if we don't know how fast must it be? Of course it is up to you in the end, but if you are seriously considering exotic options such as using stored procedures at least I would like to know what specific bottlenecks did you stumble upon as I also use

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

2017-08-17 Thread guettli
Am Mittwoch, 16. August 2017 13:39:53 UTC+2 schrieb Vijay Khemlani: > > So, please share the specific numbers you got from your profiling. > > Why should I share the numbers? How would this help? -- You received this message because you are subscribed to the Google Groups "Django users"

How to prevent the use of hidden fields in a form

2017-08-17 Thread Thiago Luiz Parolin
I have a system that does: 1 - The user registers a project with name, title and responsible teacher 2 - The teacher responsible for this project must authorize it or not So I have a page that displays to the teacher, all the projects that are waiting for authorization and in each project there is

Re: Making/Creating a verified user for unit test (django-allauth)

2017-08-17 Thread Vijay Khemlani
Check that the created user has the "is_active" field set to True On Thu, Aug 17, 2017 at 2:41 AM, Desmond Lim wrote: > Hi there, > > I'm wonder, how do we create a verified user for testing purpose > > I have this line that creates a user > > *cls.user =

Making/Creating a verified user for unit test (django-allauth)

2017-08-17 Thread Desmond Lim
Hi there, I'm wonder, how do we create a verified user for testing purpose I have this line that creates a user *cls.user = get_user_model().objects.create_user(username='testuser', email='testu...@testing.com', password='password')* When I do a test of this for my custom login interface

How to correctly subclass the 'PasswordResetConfirmView' view

2017-08-17 Thread 'disp' via Django users
I have subclassed the view PasswordResetConfirmView because I want to pass in my own form, however, I keep getting the following error: Sometimes the error