Hass
No its empty
Alex
No its empty
then create it
Anonymous
Created
See put the app name inside installed_apps list . Then run python manage.py makemigrations app_name
Anonymous
Make sure u specify app_name after makemigrations cmd
Anonymous
Then run migrate cmd
Hass
ok let me try
cj
No
how did you create the app? using django-admin createapp right? right?! or did you create a folder and all files manually?
Hass
😂 I created the way it is
Hass
Make sure u specify app_name after makemigrations cmd
It works but so see it in admin i need to register model in admin.py?
Anonymous
If u have multiple apps , u have to put app name at the end of migrations command
Anonymous
Of the corressponding app tht u want to make migrations of
Hass
Do need to specify after hitting migrate command also
Anonymous
Only for makemigrations
Hass
Bro there an error
Hass
In admin panel its registered the model but after tapping the model it says no such table
Hass
Bro see error
Hass
Run migrate now
Can u help me in pm
Anonymous
Ok
Vishnu
Hey guys how can we upload a csv file using django
Vishnu
With validations
Arezoo
Hey guys how can we upload a csv file using django
Use from django.core.validators import FileExtensionValidator
Arezoo
file = models.FileField(blank=False, null=False, validators=[FileExtensionValidator(allowed_extensions=['csv','txt'])])
Gabs
someone has got this error...? raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
Mirco
You must set SECRET_KEY into your Django settings
Gabs
in settings.py on line 24 there is a variable SECRET_KEY that contains a key
Gabs
I have it, I don't understand why it gives me that error
Anonymous
Can I display data analysis plots in Django template
Mirco
I have it, I don't understand why it gives me that error
Share your settings via pastebin and be sure Django is using that settings file
Holla
Path('home/',HomeView.as_view(),name='blog-home'), error function has no attribute 'as_view' I even check the documentation couldnt help
Anonymous
Hello, I wanna ask about django implementation with TDD(Test driven development) Is that possible? Someone have tried? I really appreciate any explanation Thanks in advance
Anonymous
I want to have dynamic choicefield in my app models , like i want to have predefined choices and then when user gives more options tht should be uploaded on same fields and next tym all these choice should come up . Any idea how can i do this ?
Alex
provide the full traceback (via pastebin)
Alex
Hello, I wanna ask about django implementation with TDD(Test driven development) Is that possible? Someone have tried? I really appreciate any explanation Thanks in advance
This book may be useful to you. The author shows an example django project developed through tests. https://www.obeythetestinggoat.com/
Alex
Yuvi do not pm me and I'm not your bro
Mohd
hello everyone i am getting error while doing migrate becouse i delete all migration file and do re makemigration but after migration my migrate is not migating. Is there any solution please tell me if anyone know Thankyou
mr.INSOMNIA
Hey, everybody! I need some help on django + uwsgi or django + gunicorn. I tried to setup both, everything worked fine, but nginx didn't serve static/media files,. Anybody, help me, pls. If you help me and everything works smoothly, I'll pay you 25$ in Bitcoin.
Bagas
reponse = testcase_client.get(...) How can run javascript function inside response content?
Halit
hello everyone i am getting error while doing migrate becouse i delete all migration file and do re makemigration but after migration my migrate is not migating. Is there any solution please tell me if anyone know Thankyou
Probably you already have those tables in your database and when you delete your migration files and regenerate them, they clash with existing tables in the db. If you think it is safe you can drop db and create db cosecutively and makemigration again.
on
Hi everyone i want to let users to track their consignment in my website
Halit
You can get a copy of the db to another location before dropping it. But let's wait for a better answer. I don't know.
Bagas
short answer - no such way.
What the correct way? But without use selenium or anything will load "gui" browser.
Alex
What the correct way? But without use selenium or anything will load "gui" browser.
to execute js code you need..... js code interpreter. You may use nodejs if you really need to do it on the backend
Alex
But I think that you are trying to do something really weird.
John
Is there any way to host django website for free I used django as a my mobile backend so I thought if I get free hosting so it is batter for me I already tried some free hosting plateform like pythonanywhere heroku AWS but all of there give free hosting for a time lap but I need hosting for lifetime or atleast 2 year
Bagas
to execute js code you need..... js code interpreter. You may use nodejs if you really need to do it on the backend
Owh, i can use selenium in gitlab-ci. I think web CI will not allow "gui" browser testing.
Shreehari
Hey guys i need a clarification. I am using uuidfield as id (pk). I am converting it into int while generating jwt token. If i use that id from token to filter database, that should work right ?
Anonymous
Hello friends Does anyone know why I get this error.. Django 'AnonymousUser' object has no attribute '_meta'
Anonymous
I get the error on my template when registering a user by it's saved on the database
entropy
yes.
Anonymous
Any good resource that directs how to power a flutter mobile app with django backend using REST!?
old
I'm trying to load objects in view py from model.py but my visual studio yells that I have no objects on that class what may be the problem
WPA2
Any good resource that directs how to power a flutter mobile app with django backend using REST!?
I'm new... can you explain power ? I mean you can just create a REST API and use Provider package in flutter to handle all the calls and updating part. Is there a better way too ?
Anonymous
WPA2
I need a good resource to get the hang of it, I find the django rest framework docs tough to understand
https://www.youtube.com/playlist?list=PL1WVjBsN-_NJ4urkLt7iVDocVu_ZQgVzF This playlist might help
Gri 🇦🇷🇺🇾
Hi , how are you? I've got a problem installing Django, can anybody help me please?😣