Re: Django beginner

2017-07-13 Thread Mike Dewhirst
On 14/07/2017 9:48 AM, Amir Pirmoradian wrote: Hey Guys, i'm a absolute beginner at Django. I started to learn django from https://www.djangoproject.com but it's too confusing. I know python completely. My question is:Should i know anything else except python to learn Django?because i don't

Re: Django beginner

2017-07-13 Thread yingi keme
Try getting the book 'django unleashed'. It is one of the most comprehensive books for absolute beginners in django. Also learn http basics, it will be valuable to understand the client/server model of django. Yingi Kem > On 14 Jul 2017, at 12:48 AM, Amir Pirmoradian

Re: Django beginner

2017-07-13 Thread Oladipupo Elegbede
Hi Amir, You seem to know what you need to do. Try harder, be positive and pay attention to those little things you think Python has taken care of for you. Get yourself through the Django tutorial and you would be good to go. On Jul 13, 2017 6:51 PM, "Amir Pirmoradian"

Re: Django beginner

2017-07-13 Thread Mike Morris
Start with the Tutorial on the djangoproject.com website. Finish it. Then, some other sources I like: * https://tutorial.djangogirls.org/en/ * http://www.tangowithdjango.com/ Google "django tutorials", there are lots On 07/13/2017 04:48 PM, Amir Pirmoradian wrote: Hey Guys, i'm a

Re: Django beginner

2017-07-13 Thread Lachlan Musicman
Amir You will need a basic - very basic - understanding of databases and webservers. The webserver will serve your content. The database will store your content. For databases, you need to know: how to create one, add a user, give that user a password. (easy, can google) For webservers, you

Django beginner

2017-07-13 Thread Amir Pirmoradian
Hey Guys, i'm a absolute beginner at Django. I started to learn django from https://www.djangoproject.com but it's too confusing. I know python completely. My question is:Should i know anything else except python to learn Django?because i don't understand Django at all.Or i should try harder?

Re: Problem with views PasswordChangeView vs. password_change

2017-07-13 Thread Tim Graham
The success_url of PasswordChangeView (actually the behavior comes from the inherited FormView) only accepts a URL, not a URL name. You can update to your code like this: from django.urls import reverse_lazy ... success_url=reverse_lazy('lori:pwd_done') On Thursday, July 13, 2017 at 11:44:43

BPMN and django

2017-07-13 Thread tatoluffy
Are there any part o framework in django to use notation BPMN? Could be possible integrate interface of SAP in django forms? Thank you, -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: Bug: Manually changing "_meta.db_table" for model causes "missing FROM-clause entry for table" error

2017-07-13 Thread Guilherme Leal
I don't think that sould be possible to change real table name "on the fly". If I'm not mistaken, that kind of attribute is used by model's meta class during class creation process to populate the django model cache, which in turn only occurs during the django configuration step. 2017-07-13 14:08

Re: Crispy forms not showing bootstrap and save/submit button

2017-07-13 Thread JHeasly
Also, do you have any FormActions defined? That's where the Bootstrap button comes from: http://django-crispy-forms.readthedocs.io/en/latest/layouts.html#bootstrap-layout-objects -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Bug: Manually changing "_meta.db_table" for model causes "missing FROM-clause entry for table" error

2017-07-13 Thread Kalvin Handilist
Hi I encounter same problem as your, do you already got the solution? Any help will be appreciated, thank you~ On Saturday, November 14, 2015 at 1:40:21 AM UTC+7, evil...@gmail.com wrote: > > Hello. > I've got the same model in two projects and want to copy data from one to > another using

Django multi table on same model

2017-07-13 Thread Kalvin Handilist
down votefavorite I have huge table that needed to be sliced into some smaller table, ex: campaign_01, campaign_02, ... While using django queryset with different table name for same model, what I only know to

Re: Crispy forms not showing bootstrap and save/submit button

2017-07-13 Thread JHeasly
Hello Taufiq — Have you tried using the "instance level helper"? See http://django-crispy-forms.readthedocs.io/en/latest/crispy_tag_forms.html#crispy-tag-with-forms >From the docs link above: from crispy_forms.helper import FormHelper class ExampleForm(forms.Form): [...] def

Re: How to create a fixed-length binary field with a unique constraint?

2017-07-13 Thread winkelmann
On Thursday, July 13, 2017 at 4:06:38 PM UTC+2, Tom Evans wrote: [...] > Guido: > > You can make your own custom database types quite simply (completely > untested): > > class FixedSizedBinaryField(models.BinaryField): > def __init__(self, num_bytes=None, *args, **kwargs): >

Re: Problem with views PasswordChangeView vs. password_change

2017-07-13 Thread Carsten Fuchs
Am 13.07.2017 um 16:56 schrieb Carsten Fuchs: the success_url='lori:pwd_done' seems to be a problem This seems to be the root also of the original problem (SuspiciousOperation…): If I insert a plain URL, e.g. success_url='/pwd_done/', then I can no longer reproduce the original problem

Re: How to create a fixed-length binary field with a unique constraint?

2017-07-13 Thread 'Tom Evans' via Django users
On Tue, Jul 11, 2017 at 12:05 AM, Mike Morris wrote: > From your description (save a SHA-256 checksum), you do not need a binary > field. Binaries are always of indeterminant length; they can hold photos, > executables, sound files, etc. > > By definition, a SHA -256 is 256

Re: django implementation group by every two hours,

2017-07-13 Thread 'Tom Evans' via Django users
On Tue, Jul 11, 2017 at 10:22 AM, kanhaiya yadav wrote: > Hi, > > I have a model > class XyzModel (models.Model): >name = models.CharField(max_length=NAME_LENGTH) >unique_id = models.CharField(max_length=NAME_LENGTH) >info =

Re: save cropped image with PIL to database

2017-07-13 Thread 'Tom Evans' via Django users
On Mon, Jul 3, 2017 at 11:09 AM, shahab emami wrote: > hello > > i have a question and i cant find answer with search. > > i want to save cropped image in database then : > this is my model: > > class Photo(models.Model): > file=

help with Django tutorial "writting our first Django app" part 4

2017-07-13 Thread Rafael Valle Cabrera
Hi everyone I am getting started with Django. My doubt is about the tutorial called ‘Writing our first Django app’ For everyone who doesn’t know about it, it’s a tutorial where you start developing a polls app. I am in the part where i have to do the forms. I am doing part 4:

Crispy forms not showing bootstrap and save/submit button

2017-07-13 Thread Taufiq Rahman
Hey guys. I'm having trouble with Crispy forms with my models. The form shows up plain without the bootstrap and there seems to be no save button which i need to save data to my model. I have tried many ways and tutorials but have failed. Any help would be highly appreciated! forms.py from

Re: Vim plugin that does Django code completion?

2017-07-13 Thread 'Tom Evans' via Django users
Hi Robert Ignore the helpful people telling you to stop using vim and use some god awful UI, the plugin you are looking for is called jedi.vim https://github.com/davidhalter/jedi-vim Debian has a package, vim-python-jedi, or you can install using Pathogen or Vundle. Cheers Tom On Fri, Jul 7,

Re: Use one correspondig database user for each application user

2017-07-13 Thread Antonis Christofides
BTW, another idea for "connecting" to PostgreSQL as different users would be to actually have Django connect to PostgreSQL as a superuser and then (probably in some early middleware) execute SET SESSION AUTHORIZATION to switch permissions. This is probably easier and more robust and it's easier

Re: Use one correspondig database user for each application user

2017-07-13 Thread guettli
Just for the records, I found a blog post how to use row level security in postgres with one application db-user: https://blog.2ndquadrant.com/application-users-vs-row-level-security/ Here is the essential code: SET my.username = 'tomas' CREATE POLICY chat_policy ON chat USING