Re: SHA-512 in django model? Optimization help?

2019-04-07 Thread René Fleschenberg
Hi Assuming you are on Postgres, Using BinaryField(max_length=64) should be good if you want to optimize for size. According to the Postgres docs, it will use "1 or 4 bytes" plus the actual string. It is also reasonably convenient to work with: instance.hashfield = hashlib.sha512(b'test').digest

Urgently help for how to deploy django on bigrock server?

2019-04-07 Thread surojitsahu07
Urgently help for how to deploy django on bigrock server? -- 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.com. To post to t

Custom sign up / log in for multi role in DRF

2019-04-07 Thread Shubham Joshi
My concern is I want to develop an API's for user registration having the multiple fields, there will be admin registration , after that, student/teacher registraion form. The form will be mailed to admin email for verification , if validated then student/teacher should able to login. -- You

Re: Django Builtin Admin

2019-04-07 Thread carlos
Hi, i thing this app help you https://github.com/oscarmlage/django-cruds-adminlte On Sun, Apr 7, 2019 at 6:37 AM wrote: > Hello Django Users, > I know django builtin admin is not possible to customize same to as the > attached picture. But Client like a nice and attractive dashboard. Is there

SHA-512 in django model? Optimization help?

2019-04-07 Thread Benjamin Schollnick
Right now, I’m generating a SHA-512 of a file in my Django model, but that requires a string of 128 bytes… I’m not positive on a better way to store the sha-512 in my model? Can anyone suggest a method / design that would be better optimized? A quick test, looks like I might be able to store t

Re: unsupported operand type (s) for -: 'NoneType' and 'NoneType'

2019-04-07 Thread 'Vinod Kumar' via Django users
Hi It error generate from model string represention where you are trying to add two other relationship model key those don't have any object. Please let me know if you have any other questions. Or share with me model structure. I'm happy to help you. On Mon, Apr 8, 2019, 5:45 AM Elias Coutinho

unsupported operand type (s) for -: 'NoneType' and 'NoneType'

2019-04-07 Thread Elias Coutinho
Save some people. Friends lack sufficient knowledge to try to solve this problem alone. I have these 3 classes below: Historical , Account

Re: Django external libraries

2019-04-07 Thread Gabo LaTo
Hi Saed. Maybe what you are trying to install does not need a migration. What is it? But the lack of error message it's an improvement. Are you able to use the library you installed now? El dom., 7 abr. 2019 a las 12:40, Saeed Pooladzadeh () escribió: > I did what you say, but when I run the mig

Re: TypeError unsupported operand type(s) for *: 'NoneType' and 'int'

2019-04-07 Thread omar ahmed
ok i understood thanks for help On Sunday, April 7, 2019 at 11:58:50 AM UTC+2, Roger Gammans wrote: > > Omar, > > When posting question to the list it's good practice to practice tell us a > little bit about what your trying to do, and how what > actions cause the error to occur. > > In this cas

Re: Django external libraries

2019-04-07 Thread Saeed Pooladzadeh
I did what you say, but when I run the migration I see this: Running migrations: No migrations to apply. Executing manage.py migrate Operations to perform: Apply all migrations: (none) Running migrations: No migrations to apply. Is it mean the migration has happened before? How can I unde

Re: Django external libraries

2019-04-07 Thread Asif Saif Uddin
try to make MIDDLEWARE_CLASSES to MIDDLEWARE first, you didn't mentioned the version of django and the extension you installed. On Sunday, April 7, 2019 at 3:58:18 PM UTC+6, Saeed Pooladzadeh wrote: > > Hello > > I've added an external library in django. I have installed in installed > apps but

Filtering choices in a form based on previous field selection

2019-04-07 Thread Gavin Boyle
Hi all, Just quickly to summarize I have an app, which allows clubs to sign up and carry out different tasks. One of the features is a scheduling / rosters. Currently I have a form to add times to the roster. The club pages work off a session key based on the initially selected club. My form cons

Does django have a user editable templating language that is secure like liquid?

2019-04-07 Thread Jeff_dev
Does django have a user editable templating language that is secure like rails has liquid? i.e. an end user can't hack template code to somehow access properties of sensitive template variables -- You received this message because you are subscribed to the Google Groups "Django users" group

Django Builtin Admin

2019-04-07 Thread shaumik . gh
Hello Django Users, I know django builtin admin is not possible to customize same to as the attached picture. But Client like a nice and attractive dashboard. Is there any one who can show me the right way? Still now I have done like this such as created two different apps like one is for public

Re: Django external libraries

2019-04-07 Thread Saeed Pooladzadeh
I removed them but still see the error. در یکشنبه 7 آوریل 2019، ساعت 14:28:18 (UTC+4:30)، Saeed Pooladzadeh نوشته: > > Hello > > I've added an external library in django. I have installed in installed > apps but when I try to migrate the model I keep getting this error: > > ERRORS: > ?: (admin.E4

Re: Django external libraries

2019-04-07 Thread Manas Nikam
Remove the bottom two duplicate middleware already present and try again On Sun, Apr 7, 2019, 3:28 PM Saeed Pooladzadeh wrote: > Hello > > I've added an external library in django. I have installed in installed > apps but when I try to migrate the model I keep getting this error: > > ERRORS: >

Re: TypeError unsupported operand type(s) for *: 'NoneType' and 'int'

2019-04-07 Thread Roger Gammans
Omar, When posting question to the list it's good practice to practice tell us a little bit about what your trying to do, and how what actions cause the error to occur. In this case though you only have a (single line in CalcPoints) which uses the '*' operator. On Sat, 2019-04-06 at 10:35 -070

Django external libraries

2019-04-07 Thread Saeed Pooladzadeh
Hello I've added an external library in django. I have installed in installed apps but when I try to migrate the model I keep getting this error: ERRORS: ?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application. ?: (ad

Re: Specifying model relationship as string vs concrete model?

2019-04-07 Thread PASCUAL Eric
Hi Mohit, The only situations where I have used strings are forward declarations or potential reference loops. Intuitively I'd say that referencing models by their name adds a slight overhead for class lookup. But since this is supposed to happen only when the model definition is loaded (field