if i have a model like
class ShelfManager(models.Manager):
use_for_related_fields = True
def create_cabinet(self, name, number_of_shelfs):
cabinet = self.create(name=name, number_of_shelfs=number_of_shelfs)
created_shelfs = 0
while created_shelfs < number_of_shelfs:
cabinet.shelfs.create()
I strongly recommend install some web server like mod_wsgi-express,
guinicorn, openlitespeed to serve files, even if its local.
Regards.
Julio C.
El mar., 7 may. 2019 a las 9:46, Idris Adegbite ()
escribió:
> Good day guys, Please can i run django on laptop without internet
> connection.
> if
Run server with command ./manage.py runserver 0:8000. 0 here tells that any
one on the same network can access the project's urls like this. Suppose
your laptop's ip is 10.0.0.156 so from your phone go to
10.0.0.156:8000/admin and you are connected to your django projects. You
must be on the same n
One way could be make a custom read only field to show it in current value
in days and take a custom field and on save_model take its value as days
multiply it with 24 and save it in model's field.
On Wed, May 8, 2019, 7:05 AM Joe Reitman wrote:
> Hi Tim,
>
> There is a 'Best Practices' guide fo
Hi Tim,
There is a 'Best Practices' guide for Django that recommends making models
fat,
https://django-best-practices.readthedocs.io/en/latest/applications.html#models.
With that it would be logical to do both conversions in the model.
Regards,
Joe
On Tuesday, May 7, 2019 at 5:24:09 PM UTC-5
Al parecer estás usando un carácter como ñ o ç, el cual es de los extendidos,
supongo intentas settear el password o el nombre de usuario, intenta con puro
carácter sin acentos o tilde ni ninguna otra forma rara.
Sent from my iPhone
> On May 7, 2019, at 16:21, noel moreira wrote:
>
> Hola ami
Hola amigos, me podrían ayudar aresolver este error:
UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position
7: ordinal not in range(128)}
Esto me paso cuando estaba creando el super usuario en django
--
You received this message because you are subscribed to the Google Gro
Hi,
I have a model with an integer field storing a duration in hours, while I
want to present that to users in a form in days. (The choice of these
different units is imposed by other factors not under my control.)
So, when saving a form, I need to convert a value in days to hours by
multiplyi
cuando voy a instalar la libreria de mysql para django 2.2 , este me
pide que debo instalar el microsoft visual c++ 14.0,,, diganme el sitio
para bajarlo.. gracias
--
MSC.BARBARO ELISOR HERNÁNDEZ RODRÍGUEZ
ESPECIALISTA EN EDUCACIÓN SUPERIOR
ESPECIALISTA GENERAL INFORMÁTICO, JCCE IJ
ANALISTA -
Try:
WSGIScriptAlias /test/tc-test /var/www/stage/hello/tc-test/django.wsgi
You shouldn't have trailing slash on first argument.
On Tue, May 7, 2019 at 7:27 PM N'BE SORO wrote:
>
> Hi I'm a beginner in python and I realized a project in Django. I have
> problems in hosting my project. here is
Remove the spaces in the paths:
WSGIPythonPath / var / www / html / ecommerce /
should be
WSGIPythonPath /var/www/html/ecommerce/
Do the same for the other paths
On Tue, May 7, 2019 at 8:57 AM N'BE SORO wrote:
>
> Hi I'm a beginner in python and I realized a project in Django. I have
> problem
Good day guys, Please can i run django on laptop without internet
connection.
if yes, Please kindly help me out with the procedures.
I am having issues connecting my phone and laptop and i dont want that to
slow down my learning.
Any help would be appreciated
--
You received this message bec
Yes you can. I do it for an IOT device that we have using Django/python, many
times it does not have an Internet connection but runs fine.
Rob
203-671-6514
Sent from my mobile device, please excuse the typos.
> On May 7, 2019, at 11:38 AM, Idris Adegbite wrote:
>
> Good day guys, Please ca
Hi all,
I am new in the Django so I am not aware about the more functionality
of the django but instead you can go with the database approach.
If user provide wrong details just set "Locked" column in database as
1 and with some filter you can LOCK the account and at the time of
reset just set this
Hi I'm a beginner in python and I realized a project in Django. I have
problems in hosting my project. here is my code in the 000-default.conf
#ServerName #ServerAlias ServerAdmin webmaster @
localhost DocumentRoot / var / www / html / ecommerce WSGIScriptAlias /
/var/www/html/ecommerce/eco
Update to my earlier answer:
Your project is called lokdon_project. Your settings.py should be in a
sub-directory (also) called as lokdon_projec below this directory.
-
On Tuesday, May 7, 2019 at 5:02:16 AM UTC+5:30, Josiah Um
Don't panic.
FIrst: when you are running it in local server mode, the wsgi.py file is of
no consequence. Only Settings.py is important. Do you see that? If your
main app (where the manage.py is available) is called as xx then the
settings.py should be within the sub-directory of this file, also
As far as I know, there are only two dependency for the django, that is
pytz and sqlparse. Rest of the code for django is written from scratch.
You can confirm this by creating a new virtualenv and install django inside
it. Command will install django as well as other 2 libraries.
Regards,
Cheta
Many of the interviewer asked me how many libraries and frameworks are
used in django project.
Please let me know the correct answer.
--
*Regards:-*Manoj Kumar Singh
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this g
I think a great way to get experience is to join a django based open
source project and see if you can help them solve some of the
outstanding tickets for the project.
this way the projects and complex and also you get to learn form other
people.
I would suggest you create an account on http
On Tue, May 7, 2019, 12:35 PM Soumen Khatua Hi Folks,
>
> I didn't understand this code please help me to understand this code.
>
> class AddressQueryset(models.QuerySet):
> def annotate_default(self, user):
> # Set default shipping/billing address pk to None
> # if default sh
21 matches
Mail list logo