Anonymous
hi everyone, we are using Django and AngularJs for project, and now it is grown into a big project but due to lack of experience we have wrote alot of code as we felt is good, and the project structure is also not messy Now we want to standardised our project structure and code, any suggestions / tutorials / reference project to do so. thanks
robbi
In my opinion vue work better with django
Zarif
Hello Guys, how can i write test for social_django urls, i can write my own apps but social-oauth is django's app #question
Rakesh
All files are working with static folder but not images .. What is the reason
Renal Eki
It is easy since Django is ORM you can do it
i've do that. but getting error ['ManagementForm data is missing or has been tampered with'] iam newbie in Django,
Sai Kumar
The given username must be set can anyone solve this
Ad
Hello all, Can anyone provide tutorial to deploy django web app on windows server r2 using public ip
Pola
I have django exam tomorrow can any one help me with the exam , I have not studied anything.
Tauqir
The project runs successfully.. i am getting this error when submitting a form.
I. Have same error and recent I solve it . I not know how solve but it's must have a URL error ... Can I get your code .. meybe me I can help you...
Anonymous
Hello friends, I have question abt uuid , although i have remove migration and create new one this bigs occurs again and again. any help much appreciated thanks
Mohammad
Each tab has a different form?
Yes, the form is different
Sopan
Heroku throws me: CRITICAL Listen failure: Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied.
Sopan
Heroku throws me: CRITICAL Listen failure: Couldn't listen on 0.0.0.0:80: [Errno 13] Permission denied.
Fixed the issue: Modified Procfile content from: --------- web: daphne restbook.asgi:application --port 80 --bind 0.0.0.0 -v2 ----- to ------ web: daphne restbook.asgi:application --port $PORT --bind 0.0.0.0 -v2 ------ Works very well
Mohammad
Share your html file, js and 5he views method handling the form submit event
https://pastebin.pl/view/3f6445d8 These are my codes. I noticed that it has nothing to do with tabs. The problem starts with the form_user_profile.is_valid condition. Can't two Jsonresponse values ​​be returned?
garrip91
How can I check data types using "if" in my document? What am I doing wrong here: https://pastebin.com/hY0LdHnb?
Кашин
Anonymous
How can i post to twitter through django app?
garrip91
Try str(type(j)) == 'int'
TemplateSyntaxError at /table/ Could not parse the remainder: '(type(j))' from 'str(type(j))'
Кашин
I remember, if it is django template construction, you can't use functions.
Кашин
This condition can be made in .py file, and then send complet list to telemplate via context
Кашин
Or you may use vue.js to do this in template
Anonymous
Hey, i need a mentor in path of learning Django can anyone help me?
Yuvraj
Hey, i need a mentor in path of learning Django can anyone help me?
just go through docs. you don't need a mentor for that :) get done with the basics and then just keep making some projects.
Yuvraj
Hey, i need a mentor in path of learning Django can anyone help me?
i used to ask my cousins what kind of website they would love to have in real life and i used to build on their ideas.
Yuvraj
🙂
Ismael
TemplateSyntaxError at /table/ Could not parse the remainder: '(type(j))' from 'str(type(j))'
The best option is to define a template tag which uses isinstancemethod. Then you could do something like {%if j:isinstance|int %} but im not sure if you can use type words on a template. Anyway in Python 3 you can use isinstance like if isinstance(j, int):
Haleem
Is it ok to delete the folder and make migration again ?
Rahkmanuly
Is it ok to delete the folder and make migration again ?
Good daytime! If you have problems with migration follow this link -> https://trameltonis.com/en/blog/how-reset-django-migrations/
Rahkmanuly
You can solve them just by deleting all migration files except init one. Then clear your database and makemigrations
Haleem
You can solve them just by deleting all migration files except init one. Then clear your database and makemigrations
I want to keep my database same.. just delete migration folder and run makemigation again
Haleem
Is it ok ?
Rahkmanuly
Then migrate
Rahkmanuly
But troubles could appear with already populated data in your db
Haleem
Then migrate
There is no problems by doing it ?
Rahkmanuly
Have a good time!
Ismael
I see next TemplateSyntaxError: "Could not parse some characters: j|:isinstance||int". My code-part: https://pastebin.com/wm9qNHbH
Sure its because the "int" word as a nonstr which its not recognise by the template engine Try j|isinstance:'int' J:isinstance|int is bad-formed cause ":" is for second argument It was my mistake sorry But be sure you register isinstance as a template tag first
Khumoyun
SHA-1 hashing algorithm will be removed in Django 4.0
Asadbek
{% if request.user.is_superuser%} <ahref=""%url'store:admin'%£"> login </a> If the user logs in, the other page will be short if the login goes to another page. {% else%} <ahref=""%url'users:profile'%£"> login </a> {% endif%} /help
R
Can anyone pls help me share some good references for Django?
Doragonsureiyā
Can anyone pls help me share some good references for Django?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Hikmet
Hey there. Is it possible to have two registration paths? I have one custom model and registration for simple user, but I also need registration for business accounts. The question is, can I use my custom user for both types of registration, where in first one I need both username and phone, but in second I have only phone as required data?
Jordy
How to display images from a folder ?? For eg. I have a folder named media and in media I have subfolder "places" In places I have a.jpg b.jpg. xyz.jpg I want to display these without separate IMG tag for each. How to do this???
Jordy
setting.py
Jordy
MEDIA_ROOT=os.path.join(BASE_DIR,'media/') MEDIA_URL='/media/'
Jordy
urls.py if settings.DEBUG: urlpatterns+=static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
Jordy
models.py class Location(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) place = models.CharField(max_length=1000) contactOfInformer=models.IntegerField(null=False,blank=False) image = models.ImageField(default='default.jpg', upload_to='places')
Jordy
then there is views.py
Jordy
and then tepmplate
Jordy
template
AGASTRONICS
:wq
Dhiraj
Any one have doc for Django rest framework?
Mohammad
Please check my question
Anonymous
Doragonsureiyā
Any one have doc for Django rest framework?
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
AGASTRONICS
DoesNotExist at /accounts/facebook/login/ Site matching query does not exist.Request Method:GETRequest URL:http://127.0.0.1:8000/accounts/facebook/login/Django Version:3.1.5Exception Type:DoesNotExistException Value:Site matching query does not exist.Exception Location:/data/data/com.termux/files/usr/lib/python3.9/site-packages/django/db/models/query.py, line 429, in getPython Executable:/data/data/com.termux/files/usr/bin/pythonPython Version:3.9.0Python Path:['/storage/emulated/0/Flog', '/data/data/com.termux/files/usr/lib/python39.zip', '/data/data/com.termux/files/usr/lib/python3.9', '/data/data/com.termux/files/usr/lib/python3.9/lib-dynload', '/data/data/com.termux/files/usr/lib/python3.9/site-packages']Server time:Sun, 14 Feb 2021 21:04:47 +0000 Help! 🆘
Anonymous
that's kind of bad 😅
Emeafu
Hello