Hi all,
need some directions, i need direction replacing file with newly uploaded
file. The upload function is working but i want to replace a file every
time i upload a new one.
my model.py
class uploadfile(models.Model):
description = models.CharField(max_length=255, blank=True)
Select
Hi Everyone,
I've been working on Django for about 3 Months now and I have developed and
deployed some applications in Heroku too.
Due to my experience in python it was easy to get going with django because
if its beautiful community.
I am now looking to make open source contributions to some orga
On Tue, 11 Jul 2017, yingi keme wrote:
I don't think you will have any app conflicts if you give them names
applying to the content of the app or any other name that suites you best.
Yingi,
I want to avoid Django reserved words if any exist. Both python and SQL
have reserved words so variab
I dont think you will have any app conflicts if you give them names applying to
the content of the app or any other name that suites you best.
Yes Ofcourse you should avoid name conflicts as regards to naming the apps
within the project. But on the purpose of github, maybe you should be concerne
My background is database applications, not web site, development so I
have started my first django-1.11.3 project by defining the database schema
and defining the classes in models.py. Now I want to define the app based on
this file and am not sure how to name it.
This project is for my own
There was a typo:
products = Product.objects.all()
for product in products:
product.image = product.productimages_set.first()
Other than that, it should work. You could try this in the django shell,
just to verify the reverse name of the relationship.
from your_app.models import *
product=
Thanks, but I am getting this error:
'Product' object has no attribute 'productimages_set'
On Tuesday, July 11, 2017 at 5:29:15 AM UTC-4, ecas wrote:
>
>
> You can query for the images, and keep the first one for the template
> rendering.
>
> products = Product.objects.all()
> for product in p
hi guys,
I am having issues with django-social-share. Am trying to add facebook
share to my django app using django-social-share, but the issue is i just
want to share a section of my page like div or article.
The problem is its share the whole page on facebook instead of section.
Please any help ?
Thank you for your answer. Yes, I use one database user since several
years, and I guess it will be that way the next years.
Nevertheless I think it is good to talk about things like this from time to
time.
Regards,
Thomas
Am Dienstag, 11. Juli 2017 12:11:59 UTC+2 schrieb Antonis Christofide
Am Dienstag, 11. Juli 2017 11:46:41 UTC+2 schrieb Avraham Serour:
>
> Where would you store the password hashes?
>
>
I see several possible ways.
1. use django.contrib.auth for authentication like before. The initial
connection to the db gets done via a database-superuser. After auth in
djang
Hi,
I have a model
class XyzModel (models.Model):
name = models.CharField(max_length=NAME_LENGTH)
unique_id = models.CharField(max_length=NAME_LENGTH)
info = models.CharField(max_length=NAME_LENGTH, blank=True)
violation_time = models.DateTimeField()
I have many rows in the databa
Hi,
This was discussed three months ago (the subject was "DATABASE DICTIONARY in
Settings.py"), and this was my opinion:
As you know, RDBMS's keep their own list of users and have sophisticated
permissions systems with which different users have different permissions on
different tabl
Where would you store the password hashes?
This would mean that no data ever could have relations between users
On Tue, Jul 11, 2017 at 12:40 PM, guettli wrote:
> I guess most applications have exactly one database user.
>
> Why not use one database for each application user?
>
> Example: User
I guess most applications have exactly one database user.
Why not use one database for each application user?
Example: User "foo" in my web application has a corresponding database user
"foo".
This way you could use row level security from the database.
PostgreSQL has a lot of interesting feat
You can query for the images, and keep the first one for the template
rendering.
products = Product.objects.all()
for product in products:
products.image = product.productimages_set.first()
--
You received this message because you are subscribed to the Google Groups
"Django users" grou
I would use:
fingerprint_sha256 = models.CharField(max_length=64, unique=True,
db_index=True)
In hexadecimal, a SHA-256 uses 64 characters (4 bits per char).
The ASCII of the characters used in the hexadecimal representation are 1
byte in UTF-8 (0-9, a-f).
--
You received this message because
16 matches
Mail list logo