Re: More controls on createsuperuser

2019-04-28 Thread JJ Zolper
What if maybe after the command is run once it then is required to check a list of approved subsequent admins before allowing creation of an account? Some kind of list stored in the admin that is required to be populated following the first admin, or maybe 3 admins? On Sunday, April 28, 2019

More controls on createsuperuser

2019-04-28 Thread JJ Zolper
All, Curious what people think about more thought and control going into who can run the createsuperuser method? For example say there's models that I don't want anyone to touch except myself as a superuser. Is it not plausible that even if I make a Django Group around that model that someone

Re: Generate PDF using reportlab and write to s3 bucket without saving locally

2019-04-28 Thread dzulzer
Figured it out: streams have this builtin position attr which bytesIO uses to keep track of to know where to insert data. Reportlab simpledoctemplate writes to the stream object, but when it completes pdf generation at doc.build(story), it doesn't reset the stream position back to the

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-28 Thread Atsunori Kaneshige
Hi, Britto, Wow, it's working as expected! Thank you so much. (*So sorry, one more question below, please find it!*) Basically, you added blank=True for author field and article field in Comment model. In this way, I don't need to set author/article field in CommentCreateView. Instead, we have

Re: How to ask questions on Django

2019-04-28 Thread Larry Martell
http://www.catb.org/~esr/faqs/smart-questions.html On Sun, Apr 28, 2019 at 12:01 PM John Bagiliko < john.bagil...@aims-senegal.org> wrote: > Hi all, > > I am a passionate Python Developer. I love Django. I have seen most of the > questions that are posed here and have tried to help. I usually

How to ask questions on Django

2019-04-28 Thread John Bagiliko
Hi all, I am a passionate Python Developer. I love Django. I have seen most of the questions that are posed here and have tried to help. I usually fail to be able to help for insufficient information. I think questions asked on this group should have much information to help us know where one is

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-28 Thread Britto .
If you don't want to display article and author in the template. Use custom form design instead of {% form.as_p %} tag. Something like this will render only comment field on template. You should not remove those fields as those are required to process form. Share the code as zip will exam it

Specific Blog Post not showing whole post after clicking link

2019-04-28 Thread silverstrings026
I have a personal_blog app that links to a full view of the post the user clicked on. I had it working but had to change the code so only the author could see it and somehow that ruined the fix. it links fine to the post, shows post id in the url (i.e 127.0.0.1:8000/personal_blog/1/ ) but no

Re: GraphQL and Django integration

2019-04-28 Thread Kaushik Roy
Hi, Please refer to https://github.com/mirumee/saleor project in github, it has integration with React, GraphQL, Apollo/Relay and obviously Django. It is an e-commerce site. you can use it for a reference. https://demo.getsaleor.com/en/ On Sun, 28 Apr 2019 at 07:02, Britto . wrote: > Hi, > >

Re: Django URLs

2019-04-28 Thread Anirudh Jain
What is the function 'detail' ? You need to assign 'slug' variable also in order to pass it to the url. On Sun, 28 Apr 2019, 13:50 Aayush Bhattarai, wrote: > Hello Everyone, > > I want to pass two url in url of template. I have added in urls.py also. > > code:- > Index.html > *http://detail.id>

Re: Unable to create the django_migrations table (ORA-00907: missing right parenthesis)

2019-04-28 Thread Jani Tiainen
And why you get the error is that Oracle 12 does have new identity column (generates primary keys without explicit trigger) which was taken into use in Django. Oracle 11g doesn't have it and thus you get pretty strange errors when you try to create tables that don't have valid 11g SQL syntax. On

Re: Unable to create the django_migrations table (ORA-00907: missing right parenthesis)

2019-04-28 Thread Jani Tiainen
Hi. Django 2.2 supports Oracle 12.1+. Oracle 11g support was dropped with Django 2.0. If you want to use Oracle 11g (which is out of support anyway from Oracle) you either need to downgrade to Django 1.11 and cx_Oracle 6.4.1 I really suggest you to update at least latest Oracle 12.2 which is

Django URLs

2019-04-28 Thread Aayush Bhattarai
Hello Everyone, I want to pass two url in url of template. I have added in urls.py also. code:- Index.html ** *In Up I want to pass slug. What Should I do.* *urls.py:* *path("detail//"),* *Thanks For Help* -- You received this message because you are subscribed to the Google Groups "Django

Re: GraphQL and Django integration

2019-04-28 Thread Jani Tiainen
Hi, REST is actually protocol independent. Though most common usage is to use it through HTTP. Same applies to GraphQL even it's protocol independent most common usage is still through HTTP. Now there exists library called graphene and django-graphene for Django integration. Challenge is that

Re: Question about form_valid: how to automatically set multiple fields when users input data via CreateView supported form?

2019-04-28 Thread chirag soni
Please share the form and form template as well. On Sun, 28 Apr 2019, 02:37 Atsunori Kaneshige I really appreciate if anybody could give me an advice about form_valid. > > Here is what I want to do. > I am making a simple blog. > I am making simple features: > 1) only superuser can create

Re: Unable to create the django_migrations table (ORA-00907: missing right parenthesis)

2019-04-28 Thread chirag soni
After executive these two commands: py manage.py makemigrations py manage.py migrate Still you face the problem then go to migrations folder and delete the associated(or all) migrations then re execute the above commands. On Sun, 28 Apr 2019, 01:26 tossouwisdom Django 2.2.2 > Cx_oracle 7.2 >