Hi All,
I have created a model in Django 2.0.6+Python 3.6 which maps to a table in
Database i.e. store table
This store table has columns- id, name, address, location, latitude,
longitude.
Currently user don't have to manually fill the location field, it is filled
with latitude,longitude based
Hi Julio,
Thank you for that. You mean to say that we have to leave it web
server rather then Django. But the files have to be authenticated based on
the request. When a person
requests for a file only his respective file has to be provided for
download.
With a bit of googling i check
Hi!
Yes exactly, the ordering meta was
ordering = ('company', 'financial_year',)
and addig order_by('financial_year') to the QuerySet solved the problem (
https://stackoverflow.com/questions/50944536/django-aggregation-issue)
Thanks,
Gallusz
2018. június 20., szerda 16:23:40 UTC+2 időpontban S
Actually on second thought, since this is a private github repo and theres
a lot of stuff in there i wouldnt want to make public, copying it/cleaning
it up to make it a public repo would be a bit of an ordeal so I'll just
post my code here.
So going through this tutorial -
https://www.abidibo.
Thank you both.
Clearly, I also missed some important points about dictionaries.
Mistakes are good teachers, but it surely helps having competent people on
a mailing list :)
I'll sum up the simple solution to context processors that worked for me,
if somebody would find it useful some day.
Bas
Hi Matthew,
That's true, You would then be able to get the dictionary values once more.
Hadn't thought of that. Good point! Thanks :-)
Regards,
Andréas
2018-06-20 15:55 GMT+02:00 Matthew Pava :
> Well, you can access a dictionary like a list using these:
>
> items.keys(), template:
>
>
I use Amazon Redshift database and Django 2.0.6. My redshift database
settings is as below:
DATABASES = {
'default': {
'NAME': 'my_db_name',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': 'my_username',
'PASSWORD': 'my_password',
'H
No problem! Thanks so much for your help, I've been struggling with this
for longer than I'd like to say and havent been able to find any help.
Since I'm using a lot of mixins that I'd like to use with this view I'll
work my way through the CBV-based tutorial up until the spot where I'm
having the
Ok, great. I am more versed with FBVs than CBVs, but if you are doing a one
form trial run I can figure it out.
It sounds like you are correctly rendering javascript to the client when
they do a GET for the form, but when they do a POST (either correct or with
validation errors) you are returni
Hi Syed,
Take a look at this part of the error:
File "/home/ssyed/polls/bin/mysite/mysite/urls.py", line 20, in
path('polls/', include('polls.urls')),
NameError: name 'include' is not defined
It appears that you have missed the addition of 'include' in your urls.py
file. The tutorial shows
Hello Gallusz,
This is probably caused by the `Financial.Meta.ordering` that you didn't
include in your snippet.
I assume it's currently defined as ('name', 'financial_year')?
In order to get rid of it you'll want to clear it up using an empty call to
order_by():
Financial.objects.order_by().
Well, you can access a dictionary like a list using these:
items.keys(), template:
for k in items.keys
items.values(), template:
for v in items.values
items.items(), template:
for k, v in items.items
From: django-users@googlegroups.com [mailto:dja
Well you only have /admin and /music in urls.py you need to add / when you
configure your ulrpatterns
Le mer. 20 juin 2018 13:47, Julio Biason a écrit :
> Hi Mayank,
>
> You tried to access "/"; there is no url associated with this path, so
> it's a 404. The only valid URLs are `/admin` and `/mu
Hi Mayank,
You tried to access "/"; there is no url associated with this path, so it's
a 404. The only valid URLs are `/admin` and `/music`.
If you want to see something when accessing `/`, you need to create a view
for it and associate it in your `urls.py`.
On Wed, Jun 20, 2018 at 9:39 AM, Maya
Hi Gokul,
Well, since this is for intranet, you may be lucky.
For large downloads, you can put your facing server (nginx, apache) to
point directly to the media directory. For example, if your media files are
being stored on `/srv/myserver/media`, and have an URL of `/media`, you
could add a loca
hi all
I am getting an error while creating the views when i try to run the server
this Page not found (404) error is being generated. but the admin section
works fine. i am attaching the image.i have also tried making migrations
but nothing happened. kindly help to solve this asap.
--
You recei
Hi,
We started migrating a java project to Django .Our present code we are
using different filters for security. Mainly we are checking below filters
· Session hijacking check
· XSS attach check
· CSRF check
· Path manipulation check(directory traversal attack)
·
Hi Folks!
I have a little problem in connection with aggregation through Django's
ORM. The sketch of my model is very simple with some custom field types
(but those types are irrelevant in the problem):
# Fields types
class MoneyField(models.DecimalField):
def __init__(self, *args, **
How to serve large file for download. Also it should handle simultaneous
requests. I have to serve the web application in Intranet environment.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
Hi,
I have tried my best to do this as good as possible, but i still
encountered the error.
*ERROR :*
(polls) ssyed@ssyed:~/polls/bin/mysite$ python manage.py runserver
Performing system checks...
Unhandled exception in thread started by .wrapper at 0x7f996a794598>
Traceback (most recent call l
I am working in Singapore and trying to store details of different
merchants of Singapore.
So if any merchant wants to add a new store, I am giving him this option
build on Django.
So once he entered his store address, the lat/long fields will be auto-fill
and location field will show the map.
T
Hi Mikkel,
No - you can't loop over a dictionary that way. However - You don't need to
resort to doing that either. If you want to loop over something use a list.
Like this:
return {
'items': [
{'name': 'year', 'readable': 'Year', 'urlname': 'year_list' },
{'name': 'region', 'r
You need access to a service (or data set) which translates addresses to
latitude/longitude.
It will depend on your country whether this information is available and/or
whether you need to pay for access to that service, and how that service
Which countries will your application cover - maybe
23 matches
Mail list logo