Re: Database migration issue

2020-04-12 Thread wanbao jin
Ok, I figure it out, When application configuration class is used in INSTALLED_APPS, the name field of AppConfig subclass should be the path of that application. AppConfig.name¶ > > Full > Python path to the

Re: Database migration issue

2020-04-12 Thread wanbao jin
> > When I just change the api.blogs.apps.BlogsConfig to api.blogs , it > worked fine. I am curious why api.blogs.apps.BlogsConfig doesn't work > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: i want to change database sqllite to mysql but show error

2020-04-12 Thread Ernest Thuku
May we see some of your files..precisely settings.py...and have you properly configured your MySQL app...either workbench or xampp? On Apr 12, 2020 20:53, "Andrew Fetting" wrote: > Have you tried > pip3 install mysqlclient > > On Sun, Apr 12, 2020, 7:36 AM Arun Sharma > wrote: > >> python

Re: Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-12 Thread Ernest Thuku
Option 2 seems good...I could think of it before proceeding to any other option On Apr 13, 2020 04:02, "Kenny Soh" wrote: > Im trying to handle a use case where i have 2 roles. (admin , customer) > > There will be an admin portal and a customer portal (2 different login > pages ). > >- An

Re: TypeError: resolve() got an unexpected keyword argument 'strict' in Django

2020-04-12 Thread Ernest Thuku
Can you please provide more details...your views.. models etc On Apr 13, 2020 01:58, "Abhishek Pandey" wrote: > Hello Everyone! > > I am a new Django learner. I followed some tutorials to install django but > when i try to runserver an error message comes up. Whenever I hit this > command:

Database migration issue

2020-04-12 Thread Jin
Hi, everyone. I'm completely new to DRF and I structured my first project as the following. When I run *python manage.py makemigrations * script, it gives errors. I guess it's related to my folder structure but don't know exactly what's wrong with it. [image: Capture.PNG] Any help would

Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-12 Thread Kenny Soh
Im trying to handle a use case where i have 2 roles. (admin , customer) There will be an admin portal and a customer portal (2 different login pages ). - An admin can invite a customer - An admin can be a customer as well , can invite himself into the customer portal - An admin

TypeError: resolve() got an unexpected keyword argument 'strict' in Django

2020-04-12 Thread Abhishek Pandey
Hello Everyone! I am a new Django learner. I followed some tutorials to install django but when i try to runserver an error message comes up. Whenever I hit this command: python manage.py runserver the following error comes up. Watching for file changes with StatReloader Performing system

Re: Django - PrePopulate the Foreign Key on the web page, and use that id to save the model.

2020-04-12 Thread _M_A_Y_A_N_K_
Cool, thanks Antje. Seems it is working now, the only thing is in Drop-down i will have the Project Name for which the URL is rest of the PRojects are removed from drop down. Now will work to have pre-selected. As of now it will default display as -- with only one required project name.

Re: i want to change database sqllite to mysql but show error

2020-04-12 Thread Andrew Fetting
Have you tried pip3 install mysqlclient On Sun, Apr 12, 2020, 7:36 AM Arun Sharma wrote: > python manage.py runserver > > > > Watching for file changes with StatReloader > Exception in thread django-main-thread: > Traceback (most recent call last): > File >

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Rok Klancar
And If this doesn't work, I think it is the best course of action to go to settings.py, and set the DEBUG=True. Then the 502 error may disappear and you'll see the Django error log V V ned., 12. apr. 2020 ob 18:06 je oseba Rok Klancar napisala: > Do it; > It can't hurt > > V V ned., 12. apr.

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Rok Klancar
Do it; It can't hurt V V ned., 12. apr. 2020 ob 18:04 je oseba Jagtar Singh Lakhyan < jagtar.lakhe...@gmail.com> napisala: > Nope > > sudo ufw allow 'Nginx Full' > > [sudo] password for wms: > > Skipping adding existing rule > > Skipping adding existing rule (v6) > > sudo ufw enable > > Command

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Jagtar Singh Lakhyan
Nope sudo ufw allow 'Nginx Full' [sudo] password for wms: Skipping adding existing rule Skipping adding existing rule (v6) sudo ufw enable Command may disrupt existing ssh connections. Proceed with operation (y|n)? y Firewall is active and enabled on system startup Do i need to sudo

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Rok Klancar
Allright, It seems that the problem lies in the firewall (ufw stands for Uncomplicated FireWall) Try this: sudo ufw allow 'Nginx Full' and don't forget to do this after: sudo ufw enable Tell me how that worked out V V ned., 12. apr. 2020 ob 17:47 je oseba Jagtar Singh Lakhyan <

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Jagtar Singh Lakhyan
sudo ufw status [sudo] password for wms: Status: inactive No funky settings as currently i want only to run the app on web, Not even installed ssl. On Sun, Apr 12, 2020 at 9:13 PM Rok Klancar wrote: > And did you set up any funky settings in settings.py, like for example > some of these: >

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Rok Klancar
And did you set up any funky settings in settings.py, like for example some of these: [image: image.png] Cuz I once tried to make a "very secure" application, and I set all of those settings, but when I moved them into production, none of them worked, because I didn't really understand them. V V

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Rok Klancar
Everything seems to be in order Maybe it's the firewall's fault. What do you get when you type 'sudo ufw status' ? V V ned., 12. apr. 2020 ob 16:09 je oseba Jagtar Singh Lakhyan < jagtar.lakhe...@gmail.com> napisala: > /etc/nginx/sites-available/iitians > > server { >listen 80; >

Re: Setting DEBUG = False causes 500 Error

2020-04-12 Thread Eki
I ran into exatly the same issue just now (10 years after your post). When I use compress in production with DEBUG=False, I get a 500 error. I wish I had read your post 5 hours ago... Everything works fine now. -- Eki On Monday, 25 January 2010 23:05:57 UTC+2, Damon Jablons wrote: > > I do

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Jagtar Singh Lakhyan
/etc/nginx/sites-available/iitians server { listen 80; server_name 192.95.37.123; location = /images/favicon.ico {access_log off;log_not_found off;} location /static/ { root /home/wms/iitians; } location /media/ { root

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Rok Klancar
Provide the contents of your file in nginx/sites-available and your gunicorn.service file V V ned., 12. apr. 2020 ob 15:57 je oseba Jagtar Singh Lakhyan < jagtar.lakhe...@gmail.com> napisala: > Hi Ajayi, > > sudo systemctl reload daemon-reload > > Failed to reload daemon-reload.service: Unit

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Jagtar Singh Lakhyan
Hi Ajayi, sudo systemctl reload daemon-reload Failed to reload daemon-reload.service: Unit daemon-reload.service not found. perhaps u mean to say: sudo systemctl daemon-reload Ran these sudo systemctl daemon-reload sudo systemctl enable gunicorn sudo systemctl restart gunicorn sudo systemctl

Re: django doughts

2020-04-12 Thread kakan ghosh
I think you missed to include your polls app urls in your project top urls file. On Sun, Apr 12, 2020, 7:05 PM Motaz Hejaze wrote: > You need the Url in urls.py > You missed some parts of the tutorial > Try to complete the tutorial following every step > > On Sun, 12 Apr 2020, 2:39 pm Anonymous

Re: django doughts

2020-04-12 Thread Motaz Hejaze
You need the Url in urls.py You missed some parts of the tutorial Try to complete the tutorial following every step On Sun, 12 Apr 2020, 2:39 pm Anonymous Patel, wrote: > Ask your query in Errormania they helped me they have django Developers > they provide within hour solutions to a problem >

Re: best practice: using only url.py from the main project

2020-04-12 Thread Chucky Mada Madamombe
Hi yes it's bad practice.this is why: The best point is to be able to reuse applications in different projects. There will be problem if you are saving all your URLs in the “projecturl.py” file. So best practice is to create an “url.py” per application and to include it in your main projects

Re: django doughts

2020-04-12 Thread Anonymous Patel
Ask your query in Errormania they helped me they have django Developers they provide within hour solutions to a problem Telegram name:- Errormania YouTube :- https://youtu.be/_xu1ds3DICA Raj Patel On Sun, 12 Apr, 2020, 6:06 pm rama prakash y, wrote: > Hi can u plz tell me how can solve the

django doughts

2020-04-12 Thread rama prakash y
Hi can u plz tell me how can solve the pollsapp development in django project. I had complete my pollsapp development project in Django documentation like that guidance.but i have browser error . -- You received this message because you are subscribed to the Google Groups "Django users"

best practice: using only url.py from the main project

2020-04-12 Thread Esther Camilo
Most of the tutorial recomends you create a url.py inside your app (as polls for example). Is it a bad practice using only url.py from the main project folder? Thanks for your attention. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

i want to change database sqllite to mysql but show error

2020-04-12 Thread Arun Sharma
python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\backends\mysql\base.py", line 16, in import MySQLdb as

Re: This is channel helping in Django errors

2020-04-12 Thread Anonymous Patel
Errormania They have. Some standards and they upload our solution to problem errors videos. I gave them 1 static error one, lets grow that django community on YouTube. Follow them on telegarm There telegram link is :- https://t.me/errormania On Sun, 12 Apr, 2020, 5:40 pm Anonymous Patel,

This is channel helping in Django errors

2020-04-12 Thread Anonymous Patel
Its an community of django Developers https://youtu.be/_xu1ds3DICA https://youtu.be/RomFqczpVzs I think we should join that community and let them know we will even provide videos to solve the problem and error. https://www.youtube.com/channel/UCxxPBCkto7W8MX6TMctgLqw/ -- You received this

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-12 Thread Sunday Iyanu Ajayi
HI Jagtar, Sometimes when you get 502 nginx server error , it can be due to the fact that your django code has some error. If there is an error in your code, nginx will no serve. Try to run sudo systemctl reload daemon-reload sudo systemctl enable gunicorn sudo systemctl restart gunicorn sudo

CUSTOMIZING ERROR 404 with debug =True

2020-04-12 Thread Sunday Iyanu Ajayi
Good day, I have a web application built with django and angular. While deploying, I had to set debug to be 'True' (debug=True) for it to work. but now we a wrong url is type with the root url, ( 192.2.3.4/ddfdf) , it takes be to the django url with debug =True and even when I customize or

Re: Django - PrePopulate the Foreign Key on the web page, and use that id to save the model.

2020-04-12 Thread Antje Kazimiers
Hi, I think in your view modulesView() you need to pass the project id to ModuleForm: .. else : form = ModuleForm(projectid) .. and then you need to overwrite the constructor of ModuleForm by adding an __init__ function: def __init__(self, projectid=None, *args, **kwargs):

django dependent drop down list without using javascript; ajax; jquery

2020-04-12 Thread Mayank Tripathi
Hi All, Could any one please share some details on how we can do dependent drop down list selection. I am seeing lot of videos or content to handle this via JavaScript; AJAX; jquery etc.. but just wondering if Django has anything which can be handled easily. -- You received this message

Django - PrePopulate the Foreign Key on the web page, and use that id to save the model.

2020-04-12 Thread Mayank Tripathi
Hi All, I am facing an issue, to pre-populate the Foreign Key on the web page. Actually i have two models Projects and Modules. To create a Module, one has to select the Project and go to Module page for create it, but there the Project is not populated. Below are the details... Please guide