CreateView autoset field

2018-04-14 Thread 'Ferdinand Rohlfing' via Django users
How can a create a field with a automatically input? Like setting the date automatically to datetime.now()? -- 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 to djan

registration with cities...

2018-04-14 Thread Muhammed YILMAZ
Hi all. First of all i want to thank you all for your very helpful, friendly ideas. i am from Turkey, it has 81 cities. i want to make a site that will enable people living in the same city to exchange goods with each other. people living in different cities should not see each other's share. a

Re: registration with cities...

2018-04-14 Thread M. Page-Lieberman
Hi Muhammed. I'm working on something very similar but starting off in only my city before attempting to branch out to others. Since, I haven't gotten to where you are yet, I don't have an exact answer. I can tell you that that I was planning to have a subfolder in the URL for each community (ex

Re: CreateView autoset field

2018-04-14 Thread Samuel Muiruri
on the models for example info = models.CharField(max_length=100, default='West Indiana') -- 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 to django-users+unsubscr.

Re: registration with cities...

2018-04-14 Thread Samuel Muiruri
Will tell you the possible ways to tackle this. 1. You assign the user model with a city name so when you filter results for a user you also filter to match the city they're in. 2. You use the browser locate feature to get gps info (latitude, longitude) feed that to django through ja

Re: How to handle a migration that last too long for being deployed?

2018-04-14 Thread Samuel Muiruri
Maybe not adequate but you could dump_data from a model and load_data and not have migrate load data also at the same time. -- 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 a

Re: CreateView autoset field

2018-04-14 Thread 'Ferdinand Rohlfing' via Django users
Thanks for the answer, it's working like I want it to work... Nice > > -- 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 to django-users+unsubscr...@googlegroups.com

Re: ImportError: No module named 'main'

2018-04-14 Thread Samuel Muiruri
try this INSTALLED_APPS = [ ... #'DjangoRestfulServer', #remove you don't import the main project 'main', #no need for substanciating an app ] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Advice needed: One big model or many apps with highly interlinked data tables?

2018-04-14 Thread Mikkel Kromann
Hi. I'm new to Django, and I'm working my way into Django by going through the nice Djangoproject.com turorial. I'm trying to find out whether Django is the right tool for my task, which is maybe a bit unusual for Django. My task is to build a web interface to a database for an calculation too

Re: I'm trying to edit address form for Saleor ecommerce platform

2018-04-14 Thread Samuel Muiruri
"adress_form_lines" you need to follow it to where you get the data from then follow that to wherever the model is, maybe it's instanced somewhere inside the model like class Model(models.Model): ... def __str__(self): return self.company_name anyway likely it's noted where

Re: Advice needed: One big model or many apps with highly interlinked data tables?

2018-04-14 Thread shubham jhandei
Hi Mikkel, I have used Django long back, so it might not be the best solution. Surely creating one big models.py and views.py will make your code not scalable for future, and making small interlinked apps will also not the best idea. Your intermediate solution is better than both above solut

Re: ImportError: No module named 'main'

2018-04-14 Thread shubham jhandei
Hi, I agree with Samuel Muiruri, your app definition in settings.py is incorrect. try this: INSTALLED_APPS = [ ... #'DjangoRestfulServer', #remove there is no need toimport the main project 'main', #no need for substantiating an app ] On Friday, April 13, 2018 at 8:04:51 PM UTC+5:30, Артём Ор

Re: CreateView autoset field

2018-04-14 Thread DYAA CHBIB
I did the same, but it does not displayed in the field ! Any advice? Thanks 2018-04-14 16:02 GMT+02:00 'Ferdinand Rohlfing' via Django users < django-users@googlegroups.com>: > Thanks for the answer, it's working like I want it to work... > Nice > >> >> -- > You received this message because you

Proxy User and AUTH_USER_MODEL: TypeError: MyUser cannot proxy the swapped model 'myapp.MyUser'.

2018-04-14 Thread Nicolas Pantel
Hi, I need help on the topic: Proxy for User model referenced as AUTH_USER_MODEL. As stated in the doc, needing to add some methods to User model, I tried to make a 'proxy' model. I made a 'from scratch app', with only a MyUser(User) model, and AUTH_USER_MODEL = 'myapp.MyUser' in settings.py

Struggling with pulling information out of a class in models.py (Thank you in advance for any help!)

2018-04-14 Thread coreyjbishop
Dear all, I am really struggling with pulling information out of a class object. I have tried doing this with FK field, proxy models (shown below as I feel this is the closest to working), etc. and cannot get it to work. I cannot pull the information from my database. I would greatly appreciate