Re: AutoField

2019-05-26 Thread Saeed Pooladzadeh
But I have just one AutoField()!!! در دوشنبه 27 مهٔ 2019، ساعت 5:40:19 (UTC+4:30)، Yoo نوشته: > > Probably because you have two AutoFields. You can’t have two in the same > model. Set this to eid=models.AutoField(primary_key=True) > > This is because Django models automatically makes an id

Re: AutoField

2019-05-26 Thread Andrew C.
Probably because you have two AutoFields. You can’t have two in the same model. Set this to eid=models.AutoField(primary_key=True) This is because Django models automatically makes an id autofield primary key if nothing else is set as pk. On Sun, May 26, 2019 at 9:05 PM Bob Gailer wrote: > On

Re: AutoField

2019-05-26 Thread Bob Gailer
On May 26, 2019 8:16 PM, "Saeed Pooladzadeh" wrote: > > > Hi > > When I add this line in my model: > > eid=models.AutoField() > > I see error in my migration!! > > What is the problem? > > I don't know what your problem is but our problem is that we have no idea what error you got. Please copy

AutoField

2019-05-26 Thread Saeed Pooladzadeh
Hi When I add this line in my model: eid=models.AutoField() I see error in my migration!! What is the problem? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: What is this error mean and what can I do

2019-05-26 Thread Saeed Pooladzadeh
But I performed migration many time!! در دوشنبه 27 مهٔ 2019، ساعت 3:48:25 (UTC+4:30)، ramadhan ngallen نوشته: > > You got this error because you didn't perform migrations to create the > table in your database > > Run>> python manage.py makemigrations > > It will create migration number under

Re: What is this error mean and what can I do

2019-05-26 Thread ramadhan ngallen
You got this error because you didn't perform migrations to create the table in your database Run>> python manage.py makemigrations It will create migration number under migrations. Then make sqlmigrations >> python manage.py sqlmigration   It will create sql scripts to create a table on your

What is this error mean and what can I do

2019-05-26 Thread Saeed Pooladzadeh
Hi This is my model: from django.db import models from django.conf import settings # Create your models here. class Smodel(models.Model): eid=models.IntegerField() elogin = models.CharField(max_length=8) epassword= models.CharField(max_length=8)

deploy to Heroku " collectstatic --noinput "

2019-05-26 Thread omar ahmed
git push heroku master Counting objects: 4, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 414 bytes | 0 bytes/s, done. Total 4 (delta 3), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source:

push project to Heroku " collectstatic --noinput "

2019-05-26 Thread omar ahmed
git push heroku master Counting objects: 4, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 414 bytes | 0 bytes/s, done. Total 4 (delta 3), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source:

Re: Hosting - Does pythonanywhere supports all features as AWS.

2019-05-26 Thread Balaji Shetty
Does pythonanywhere supports all features as AWS. Or any service it does not as compared to AWS. On Sat, May 25, 2019 at 6:50 PM Subramanian Sridharan < clawsonfir...@gmail.com> wrote: > I prefer PythonAnywhere for hosting. > > On Saturday, May 25, 2019 at

KeyError at /admin/newapp/profile/add/ and Search Error --- Related Field got invalid lookup: icontains

2019-05-26 Thread Balaji Shetty
Hi Here i want to exclude some model filed depending upon type of User. Example if username is "dgp", i want to exclude in admin.py if username == "dgp": * self.exclude = ("UserNext","UserNextDate","UserNextDepartment","CaseStatus")* *in* def get_form(self, request, obj=None,

Re: Working with Databases

2019-05-26 Thread Bob Gailer
Miscellaneous thoughts follow in no particular order. I always like to start with some kind of entity relationship (ER) diagram. This makes it easy to visualize the overall structure of things. Read the description in the Django Docs of JSONfields. They don't really do what you want. I think

Working with Databases

2019-05-26 Thread Derek Dong
I'm relatively new to Django and web development in general but have decent coding experience. My questions are primarily related to how to work with models to create a ranking system. Some background: I'm an officer for an academic school team and am trying to implement a ranking system that

Re: Right method for url mapping

2019-05-26 Thread Saeed Pooladzadeh
Yes, that's very fine. Thanx در یکشنبه 26 مهٔ 2019، ساعت 15:55:55 (UTC+4:30)، Yoo نوشته: > > Are you in your application's urls.py or your project's urls.py? You need > to be in your APPLICATION'S urls.py for this to work. Your application's > folder has admin.py, apps.py, forms.py, etc. > >

Re: Right method for url mapping

2019-05-26 Thread avi gehlot
you can write only path(' ', views.show, name='index') On Sunday, May 26, 2019 at 4:44:18 AM UTC+5:30, Saeed Pooladzadeh wrote: > > Hello > > Wich of them is the right method for url mapping: > > path('', views.show, name='index'), > > or > > path('index', views.show), > > Regards, > > Saeed >

Re: Right method for url mapping

2019-05-26 Thread Yoo
Are you in your application's urls.py or your project's urls.py? You need to be in your APPLICATION'S urls.py for this to work. Your application's folder has admin.py, apps.py, forms.py, etc. In your views.py, do you have "show" defined? Like: def show(request): context = {}

Re: Create a real small business website with Django as soon as possible!!

2019-05-26 Thread Yoo
For #3, Django documentation helpfully describes a method. 3) https://docs.djangoproject.com/en/2.2/topics/i18n/translation/#how-django-discovers-language-preference Not sure of sample project, but a simple Google serach on for a GitHub page is enough For #2, Built-In admin is still possible

Re: Right method for url mapping

2019-05-26 Thread Saeed Pooladzadeh
Can you please explain. But I have seen in one of my app it works with just second one!! در یکشنبه 26 مهٔ 2019، ساعت 3:49:59 (UTC+4:30)، Yoo نوشته: > > First one. Usually I'd have it be views.index. Otherwise, the first one is > perfectly fine. Need explanation? > > On Saturday, May 25, 2019 at

Re: How to get object id from database?

2019-05-26 Thread anchal agarwal
Thanks . It worked !! On 26-May-2019 5:05 am, "Rob Gmail" wrote: > Look at the new Boston.com he did a tutorial on exactly this issue > > Rob > 203-671-6514 > Sent from my mobile device, please excuse the typos. > > On May 25, 2019, at 7:25 PM, Yoo wrote: > > Maybe try album__id (two