write a new app

2020-03-18 Thread Mohsen Pahlevanzadeh
Dear All, I need to write an real app for my CV, But I want to write a usable app, Not just a app for upload in github. What do you recommend? Of course , I don't want to code html/css and js. I want to write only back-end. --mohsen -- You received this message because you are subscribed to th

Re: write a new app

2020-03-19 Thread Mohsen Pahlevanzadeh
You mean I implement such as : https://www.django-rest-framework.org/ ? On Thu, Mar 19, 2020 at 4:34 AM ANi wrote: > > Well, you can write an integrated API service app. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe fr

Forienkey to same table

2020-03-29 Thread Mohsen Pahlevanzadeh
I have table A with my following fields: 1. id (PK) 2. fname (text) 3. name (text) 4. A_id (integer) I have problem with 4th field, Because it has to refrenced to id field. I can't implement it into Django. How can I write model class for above table in models.py ? --mohsen -- You received thi

How to send dict to template and use it

2020-05-06 Thread Mohsen Pahlevanzadeh
I have the following view function: def index(request, question_id): latest_question_list = User.objects.all() #Post.objects.all() template = loader.get_template('posts/index.html') context = { 'latest_question_list': latest_question_list,

User.objects.all() returns only one field

2020-05-07 Thread Mohsen Pahlevanzadeh
User.objects.all() only returns one field, I need to others fields such as first_name or last_name. How can I access others field? -- 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,

Re: No module named 'blog'

2020-05-07 Thread Mohsen Pahlevanzadeh
Where did you import your module? On Thu, May 7, 2020 at 3:09 PM Mukesh Badgujar wrote: > already added > > 'home.apps.HomeConfig', > 'blog.apps.BlogConfig', > 'shop.apps.shopConfig', > > one thing is that, i copied this app folder frm my other project, this is > not created here > >

import my data and generating models.py

2020-06-18 Thread Mohsen Pahlevanzadeh
Hello, I have two sql files : 1.creating tables 2.INSERT data Now I want to import to my database and generating my models.py according to my sql files. Is it possible? if true, please guide me. -- You received this message because you are subscribed to the Google Groups "Django users" gro

./manage makemigrations and ./manage migrate don't work

2020-06-18 Thread Mohsen Pahlevanzadeh
I run : ./manage makemigrations and ./manage migrate with the following output: """ (django_sql) mohsen@debian:~/Documents/django_sql/django_sql$ ./manage.py makemigrations Migrations for 'sql': sql/migrations/0

Re: import my data and generating models.py

2020-06-18 Thread Mohsen Pahlevanzadeh
On Friday, June 19, 2020 at 10:36:11 AM UTC+4:30, Mohsen Pahlevanzadeh wrote: > > Hello, > > I have two sql files : 1.creating tables 2.INSERT data > > Now I want to import to my database and generating my models.py according > to my sql files. > > Is it possible?

Re: 'Allowed_hosts' setup question

2020-06-21 Thread Mohsen Pahlevanzadeh
I recommend you to use iptables. On Sun, Jun 21, 2020 at 4:08 PM o1bigtenor wrote: > > Greetings > > At the beginning stages of my Django journey running on Debian > testing, postgresql 12 Django 3 using Python3 (and definitely no > bloody expert under the hood!!). > > Working on a personal use a

User.objects.all() only returns username

2020-07-02 Thread Mohsen Pahlevanzadeh
When I use select * from auth_user; I get the following result: ++++--+--++---+--

Re: User.objects.all() only returns username

2020-07-03 Thread Mohsen Pahlevanzadeh
I don't have model.py for auth_user. On Friday, July 3, 2020 at 11:10:17 AM UTC+4:30, RANGA BHARATH JINKA wrote: > > send me your models.py > > On Fri, Jul 3, 2020 at 12:06 PM Mohsen Pahlevanzadeh > wrote: > >> When I use select * from auth_use

Re: User.objects.all() only returns username

2020-07-03 Thread Mohsen Pahlevanzadeh
= models.DateTimeField() class Meta: managed = False db_table = 'auth_user' On Friday, July 3, 2020 at 11:10:17 AM UTC+4:30, RANGA BHARATH JINKA wrote: > > send me your models.py > > On Fri, Jul 3, 2020 at 12:06 PM Mohsen Pahlevanzadeh > wrote: > >> When I use

Re: Need Covid 19 Database for Experiments

2020-07-03 Thread Mohsen Pahlevanzadeh
https://www.who.int/data/gho/info/athena-api On Fri, Jul 3, 2020 at 7:39 PM Shubham Garg wrote: > > Hi Balaji, > > You can get COVID-19 dataset from kaggle.com > > Let me know if you have any questions. > Thanks, > > On Thu, Jul 2, 2020 at 11:07 PM Balaji Shetty wrote: >> >> Hi >> >> Can anyone

django extensions and thems such as worpress or other cms

2018-07-20 Thread Mohsen Pahlevanzadeh
Hello, I'm migrating to django from another framework, Really python is strong. Can I do upload a site rapidly such as wordpress? I need to use extensions and them? Is it possible in django? --mohsen -- You received this message because you are subscribed to the Google Groups "Django users"

text data types

2019-10-08 Thread Mohsen Pahlevanzadeh
I need to create text data type in model.py, CharField() has max_len as mandatory, What do you recommend instead of CharField() ? -- 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,

select field(s) from myytable;

2020-01-10 Thread Mohsen Pahlevanzadeh
Hello everybody, I can write a query with django if I have : "select * from mytable;" But if I have a field , I can write, such as "select f1,f2 from mytable;" Please help me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

specefic field(s) for each query.

2020-01-11 Thread Mohsen Pahlevanzadeh
Hello everybody, I can write django code for "select * from mytables;", but I can't specefic fields such as "select field(s) from my table;" Please help me.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group a