Re: Django, Markdownx, image upload from admin after deployment

2020-05-02 Thread Atsunori Kaneshige
Hi, Yashwanth, Thank you for your reply. I watched it, but this is nothing to do with markdownx. I implemented markdownx, https://github.com/neutronX/django-markdownx. This is working properly locally and I can upload images by drag in my admin site. *However, I cannot drag and drop images from

Django, Markdownx, image upload from admin after deployment

2020-05-02 Thread Atsunori Kaneshige
Hi, everyone, I have a problem in uploading image from admin site of my simple blog. Everything works fine locally. *I implemented Markdownx and I can drag and drop images into new blog in admin.* The uploaded images from admin site are stored in media/markdownx folder as expected. I did

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

2019-04-29 Thread Atsunori Kaneshige
on. Added comments to context of >> ListView then displayed it in template. >> Always think about Function Based View first then convert it to Class >> Based View, it would help you learn well. >> >> >> Regards >> Britto >> >> >> On Mon, 29 Apr 2019

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
working fine after added **kwargs parameter. >> >> You could always use a requirements file while sharing code files. For >> that use pip freeze > requirements.txt command. >> >> >> Regards >> Britto >> >> >> On Sun, 28 Apr 2019 at 20:04

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

2019-04-27 Thread Atsunori Kaneshige
al after running development server and your action to > trigger error, see what are the attributes available for your request. > > Probably you have to set form.instance.article = request.POST.get('article') > would work. > > Regards > Britto > > > On Sun, 28 Apr 2019 a

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

2019-04-27 Thread Atsunori Kaneshige
', '/Applications/anaconda3/lib/python3.6', '/Users/Koitaro/.local/share/virtualenvs/MMBlog-58h299OP/lib/python3.6/site-packages'] Server time: Sat, 27 Apr 2019 21:24:45 + On Saturday, April 27, 2019 at 5:07:19 PM UTC-4, Atsunori Kaneshige wrote: > > I really appreciate if anybody coul

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

2019-04-27 Thread 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 articles. 2) logged-in users can make comments to articles. I followed along tutorials and mostly done. *But

Re: columns were not added/created to my database table (postgresql) after makemigrations/migrate

2019-02-05 Thread Atsunori Kaneshige
method in order to return something from > the models you have created. Also you have to register your models to > admin.py file. You can refer Django documents for that. > > On Wed, Feb 6, 2019, 8:03 AM Atsunori Kaneshige wrote: > >> Hi, Django masters! >> >>

columns were not added/created to my database table (postgresql) after makemigrations/migrate

2019-02-05 Thread Atsunori Kaneshige
Hi, Django masters! My app has simple models.py just two fields like below. #models.py class List(models.Model): item = models.CharField(max_length=200) completed = models.BooleanField(default=False) #migration 0001 class Migration(migrations.Migration): initial = True dependencies =

Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-03 Thread Atsunori Kaneshige
)) > > # Or, a bit more verbose, for example: > for c in question.choice_set.all(): > print(c.pk, c) > > # Is the following a valid PK among the choices printed above? > print(request.POST['choice']) > > Best regards, > Carsten > > >

Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-03 Thread Atsunori Kaneshige
tabase > like the process is same as you used for the questions. > On Sun, Feb 3, 2019, 8:53 PM Atsunori Kaneshige wrote: > >> Hi Nitin, >> >> Thank you for your comment. >> >> I did >> >> jango-admin startproject mysite >> >>

Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-03 Thread Atsunori Kaneshige
(choice_text='Just hacking again',votes=0) In [32]: c.question Out[32]: In [33]: q.choice_set.all() Out[33]: , , ]> In [34]: q.choice_set.count() Out[34]: 3 choice exits, or correctly working? Nori On Sunday, February 3, 2019 at 10:55:48 AM UTC-5, Atsunori Kaneshige wrote: >

Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-03 Thread Atsunori Kaneshige
hackin')) File "", line 1 c = q.choice_set.filter(choice_text__startswith='Just hackin')) ^ SyntaxError: invalid syntax In [37]: c = q.choice_set.filter(choice_text__startswith='Just hackin') In [38]: c.delete(

Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-03 Thread Atsunori Kaneshige
On Sunday, February 3, 2019 at 10:22:56 AM UTC-5, Atsunori Kaneshige wrote: > > Hi Nitin, > > Thank you for your comment. > > I did > > jango-admin startproject mysite > > and cd mysite, then > > python manage.py runserver > > and server is workin

Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-03 Thread Atsunori Kaneshige
question there? > > On Sun, Feb 3, 2019, 8:39 AM Atsunori Kaneshige wrote: > >> Oh, one note is that I am using postgresql. >> everything else except vote function in views.py seems working. >> >> Sorry, any help would be really appreciated! >> >> Nori &g

Re: PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-02 Thread Atsunori Kaneshige
Oh, one note is that I am using postgresql. everything else except vote function in views.py seems working. Sorry, any help would be really appreciated! Nori On Saturday, February 2, 2019 at 10:02:14 PM UTC-5, Atsunori Kaneshige wrote: > > Hi Django users, > > I started using Dja

PLEASE HELP! Django documentation, Writing Your First App, Part 4

2019-02-02 Thread Atsunori Kaneshige
Hi Django users, I started using Django recently. I am following the official Django tutorial. I am just at Writing Your First Django App, Part4, and I have been just copying and pasting all codes. But I have a problem in vote. I inserted print(question) and this is printed in detail.html also,