I suggest that you use Celery.
If people are making HTTP requests of you, that is reason enough to choose
Django.
But do not wait for long calculations to complete before returning an HTTP
result. Instead redirect to a page containing simple JavaScript that will
poll for a result.
PostgreSQL is
ur colleagues could be right to want to move off
Django. We don't know much about your particular circumstances.
For more information on optimizing Django for scale, check out this book.
https://highperformancedjango.com/
Best of luck.
Bill
On Wed, Feb 3, 2016 at 10:30 AM, Joshua Pokoti
Try this:
https://github.com/jdunck/python-unicodecsv
On Fri, Feb 5, 2016 at 9:14 PM, elcaiaimar wrote:
> Hello,
>
> I have a CSV File and I want read it. The problem is that it has non ASCII
> characters such as 'Ñ' and accents and I need that they are recognised to
> save the CSV content in a
Or clone into a new virtualenv (you are using virtualenv, aren't you, and
you are using requires.txt and pip, and your code is in revision control,
right?), then change the Apache configuration to use the new VE and restart.
On Wed, Feb 17, 2016 at 7:00 AM, Mike Dewhirst
wrote:
> Try stopping Ap
The interesting thing is how chained assignment is implemented. In C, the
following is an expression, and has a value:
a = b
This leads to the compiler not being helpful for the famous =/== typo in
this like:
if (a = b) { ... }
In python the only expression in:
a = b = c
only has one
The only problem I can think of with a DB script is that it may have to be
recoded at unpleasant times, such as when you run a migration to take a new
version with a security fix.
If you are going to do it in Django, it would be by saving stuff out to a
fixture, maybe with a custom management comm
bably less
important. You may have to clean up old DB content for that user before
the restore. So I might write the restore in python. But then, I've never
written DB PL, so I could be missing a bet.
On Thu, Mar 10, 2016 at 12:15 AM, Mike Dewhirst
wrote:
> On 10/03/2016 11:15 AM,
As far as learning python goes, especially if you already program in
another language, the tutorials at docs.python.org are quite good. If you
are using python 2 instead of python 3, note the "Docs for other versions"
section in the top of the left hand column. If you don't already program
in som
Consider the tag.
On Fri, Mar 25, 2016 at 4:47 PM, Seti Volkylany
wrote:
>
> I had text in database on TextField. I am using this field in my template
> applying tag *linebreaksbr* but text displaying simple plain.
>
> In console I have next result:
>
> Out[60]: 'class UpdateAccountInfo(LoginRe
You might find it helpful to look at the Wagtail CMS (wagtail.io). It may
not solve your problem, but Wagtail stores page-layout information in JSON
format in a database column. The JSON can be revised without modifying the
database schema.
On Wednesday, June 27, 2018 at 8:18:09 AM UTC-4, pr
I didn't deeply consider your problem, but the aspect of doing a repetitive
task at unrelated time intervals reminds me of how the Unix kernel handles
the alarm() system call for multiple, unrelated processes. For you, it
will take at most one thread to handle any number of users.
1. Main
I wonder if this would work: represent ASAP as a legitimate DateTime value
that is, say, 100 years in the future. Then a simple reverse sort will
display all of the ASAP tasks before any others.
This is a hack, and nothing but a hack. But you could implement it in five
minutes.
On Thursday,
ns in one file and only see one at a time. I wonder what you
gain by your approach.
Looking forward to your reply,
--- Bill
(I myself mostly use "vi", with bash convenience functions for hopping
around in the source tree. I like PyCharm a lot, but it does not cover the
remote exec
The question is whether testing asynchronous operations and is compatible.
In my understanding, Andrew's hint points you in the only good direction.
You've got to turn the async initiate/complete cycle back into a
synchronous flow.
You can poll from another thread, or use a message queue, or
A context contains the variables that you want your template to be able to
access. It is common to want to access stuff from the request. You could
copy those things that you need into the dict that you pass to the Context
constructor or define an element of the dict to hold the Request object an
I've run into this problem, I use get-pip.py
(https://bootstrap.pypa.io/get-pip.py) to update pip to the latest version
when I start a new venv.
Just save that script and run it with 'python get-pip.py' when you have the
venv active.
On Tuesday, September 4, 2018 at 6:14:40 AM UTC-7, Christian
Good day,
I've read an article about Django REST framework, and have a question: is
this framework a part of Django?
I'm actually going to use it only for REST, cause we are using
microservices architecture, and UI container is a separate part.
Is it good idea? What do you think?
Thanks!
--
You should be keeping settings.py secure. There's other stuff that
shouldn't be public. That's why the django project directories are not
included in the pages that the front end web server is allowed to serve,
among other things. Security is tough. There's no magic answer.
On Fri, Nov 30, 2018
TextField()
On Tue, Oct 8, 2019 at 12:42 PM Mohsen Pahlevanzadeh <
m.pahlevanza...@gmail.com> wrote:
> 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
Yes, RTFB!
From: django-users@googlegroups.com on behalf
of Mohammad yunus
Sent: Tuesday, October 29, 2019 1:29 PM
To: django-users@googlegroups.com
Subject:
Can anyone tell me how to connect mysql database.. with step by step?
--
You received this message
Good morning Simon,
Sorry for the delayed response. I a using Django 2.2.6 (released October
1st, 2019)
Kind regards,
Bill
On Thu, 14 Nov 2019 at 16:41, Simon Charette wrote:
> Hello Bill,
>
> Could you give us more details about which version of Django you are using?
>
>
Good day Simon,
I reproduced with Django 2.2.7, I receive the same error.
Kind regards,
Bill
On Fri, 15 Nov 2019 at 17:19, Simon Charette wrote:
> Can you reproduce with Django 2.2.7 (releases November 4th, 2019)
>
> Le vendredi 15 novembre 2019 06:04:32 UTC-5, Bill Bouza
no
From: django-users@googlegroups.com on behalf
of Franz Ulenaers
Sent: Tuesday, November 19, 2019 5:15 PM
To: Django users
Subject: Re: mysql data connectivity problem
Hi,
Do you want to write a python program which read a sqlite3 database and maybe
do some
SQLite is fine for development, but, unless things have changed, it is
single threaded, and unsuitable for a production environment. Most folks
seem to go for MySQL, though the fork MariaDB is usually preferred no that
Oracle owns MySQL. I prefer PostgreSQL (or just Postgres) because I think
that
ELECT a.matr
,[nom]
,[prn]
,cast([dat_nais] as date) as dat_nais
, (YEAR(getdate()) - YEAR(dat_nais)) as age
,cast([dat_deces] as date) as dat_deces
,cast([dat_imm] as date) as dat_imm
,cast([dat_aj] as date) as dat_j
,[cod_position]
,YEAR(dat_imm) as a
ups-with-q
>
> On Sun, Dec 1, 2019, 21:08 bill dexter <55dexte...@gmail.com> wrote:
>
>> ELECT a.matr
>> ,[nom]
>> ,[prn]
>> ,cast([dat_nais] as date) as dat_nais
>> , (YEAR(getdate()) - YEAR(dat_nais)) as age
>> ,cast([dat_d
substitute for doing your own research into costs, features,
restrictions, and reputation of the various possible providers.
Bill
On Sat, Nov 30, 2019 at 1:54 PM Debabrata Chakraborty <
debobroto.c...@gmail.com> wrote:
> Thanks a million ke1g!
>
> That was really helpful. I am
'num___annee',
> 'prn'))
>
>
> Plz add more alias field as your sql command according to a sample above.
>
> Ps: check your question first(sql), then pass to communities.
>
>
>
> On Mon, Dec 2, 2019, 21:16 bill dexter <55dexte...@gmail.com> wro
That sounds like a good choice. Do pay attention to any security procedures
that they suggest in their documentation. And do keep backups of at least
the basic system and configuration files, if not occasional database dumps,
that are local to you.
Good luck, and have fun.
Bill
On Tue, Dec 3
Hello. This should be simple, but... I haven't found a good answer.
I have the following setting in config.settings.base.py:
STRIPE_TEST_PUBLIC_KEY = os.environ.get("STRIPE_TEST_PUBLIC_KEY",
"")
It works, but am I right to worry about exposing a secret key for
payments in base.py?
I've tried to
Yes, that's it. Thank you, Mohamed!
--
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.
To view this discussion on the web
Note that these give the only value. This won't work if you have more than
one value in the dict, since you won't know which you will get. Where d is
the dict:
list(d.values())[0]
or
for i in d.values():
# use i here
print(i)
or
d[list(d)[0]]
I'm sure that there
use the same hash method; instead, select a
hash method from a list like [ "SHA-1, SHA-256, "MD5", ] by taking the size
of urls.py modulo the length of that list.
I look forward to hearing comments about this approach.
Bill Torcaso
--
You received this message because yo
I have used Django Fiber: http://ridethepony.org/
And several other CMS. I mostly used TinyMCE.
The world may have moved on.
On Sat, Feb 8, 2020 at 11:02 AM johnf wrote:
> Thanks that is a start. I would also like something that will help with
> design of the pages/views.
>
> Johnf
>
> On 2/
orward with some pictures, menu
> and a few pages) then hand that over to the owners to maintain using
> TinyMCE?? What about mobile etc...?
>
> Johnf
>
> On 2/8/20 8:36 AM, Bill Freeman wrote:
>
> I have used Django Fiber: http://ridethepony.org/
> And several other
will help you with 2
and especially 3, but you have to learn how to use the framework, and how
to connect it to Django. Those are useful things to learn, but they're not
overnight reads, and can have performance pitfalls.
Good luck, Bill
On Wed, Feb 12, 2020 at 3:17 PM Phil Kauffman
wrot
t it today).
On Thu, Feb 13, 2020 at 7:38 AM Phil Kauffman
wrote:
> Bill,
>
> Thank You for taking the time to respond. I will definitely need to read
> up on the options you presented. My first inclination was to get familiar
> with the first option as it seems easiest. However, now
Merric Mercer wrote:
> 1. Design a template with lots of {% if %} conditional statements
>
> 2. Do the bulk of the work in the view, by doing something like:-
>
> 3. Do a combination of the two above
4: Caching?
cheers
Bill
--~--~-~--~~~-
s held in a cookie. If A and B are sharing session
state via cookies as you suggest, you'll need to instruct downstream
caches to respect the cookies using a Vary header directive:
http://www.djangoproject.com/documentation/cache/
cheers
Bill
--~--~-~--~~~---~-
Bill de hOra wrote:
>
> http://www.djangoproject.com/documentation/cache/
One other thing; be sure you are only ever issuing the initial cookie
with POST request and not a GET.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because y
ere's no standard patterns or models for this, is this worth
thinking about at as an extension app? In my part of the world, being
able to run a multilingual site is often a 'checkbox' requirement.
cheers
Bill
--~--~-~--~~~---~--~~
You receive
Jacob Kaplan-Moss wrote:
> Hey Bill --
>
> *Great* question. We've talked a few times to newspapers who cross-publish
> (usually in English and Spanish), and at least in the news industry there's
> pretty much nothing that makes that process easy. I would abs
et RDF for free, plus you stay within Django's existing programming
idioms.
I agree with David, this is a very interesting project. God, it's great
to be back on this list.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subs
a loading code accounts for 20%
of the lines of code in the Django application"
was that for tests?
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
args signature), but got this:
'dict' object has no attribute 'get_sql'
when the QuerySet was evaluated.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
val = request[key]
if val.strip() != "" and val.strip() != "-1":
kwargs["%s__exact"%key]=int(val)
results = Message.objects.filter(**kwargs)
print "results: ", results
...
]]]
cheers
Bill
ally have a common superclass) .
The canonical usecase in django are applying comments to any model, or
for tagging. If you like how the comment api works, they might be for you.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
with considerable effort. I think
I'd wonder why bother tho' - the main reason I cna think of is for the
CMS case where users can create
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
Bill de hÓra wrote:
> For models and admin usage your storage will need to meet the DBAPI
> contract. I think it can be done, but with considerable effort. I think
> I'd wonder why bother tho' - the main reason I cna think of is for the
> CMS case where users can create
to have two choices:
- write the link into the FormWrapper/AddManipulator configuration's
data.
- pass the link along as another param to the template
Is there any support for the former way (had a look, no mutators jumped
out at me) or should I just send the link param along?
cheers
Bi
he admin seems
wants me to work from DublinCoreMetaCrap first and add a FooDocument -
perhaps I'm missing something.
cheers
Bill
* Zope/Plone works this way as well. It makes me say things like "FAQ
is_a DublinCore", which is dangerously close to
Bill de hÓra wrote:
> So after catching the source URL off the POST request, and before
> forwarding to the template, I seem to have two choices:
>
> - write the link into the FormWrapper/AddManipulator configuration's
> data.
>
> - pass the link along as ano
#x27;s what OO is for
ultimately). At that point I think to be idiomatic and consistent across
your domains, put the Manager inside the Model:
class DomainModel(models.Model):
# fields
class Admin:
pass
class Meta:
pass
class Manager: # 'logic' fu
ite/static/
- tell the toplevel urls.py where to get the files:
STATIC_LOC="/path/to/static/"
urlpatterns = patterns('',
(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': STATIC_LOC}),
)
- markup in templat
ed forms I'd tend to use a URL as the hidden field and
hold all the data captured there. If the user can go away later and
re-continue where you don't just time them out on the session (ie like a
grants application form) create a model for the form data and associate
it with the u
. That way your django template/view code knows nothing about where
the objects are coming from, how they are constructed, or how often they
should check for freshness; and if this data is as complex as you say
marshalling and storing in another process seems sensible.
cheers
Bill
--~--~-
Luke Plant wrote:
>
> Long version:
> request.POST is (essentially) a dictionary of post variables. As such,
> if it is empty, it evaluates to False, even if the request method is
> 'POST'.
That's a bug, imo.
cheers
Bill
--~--~-~--~~
Bill de hÓra wrote:
> Luke Plant wrote:
>> Long version:
>> request.POST is (essentially) a dictionary of post variables. As such,
>> if it is empty, it evaluates to False, even if the request method is
>> 'POST'.
>
> That's a bug, imo.
Nev
rt worrying about moving
> everything to Django or is better to build everything on Django due
> our inexperience ;)
Run the inspectdb tool over your database. It'll give you enough
feedback on whether you can migrate or will have to port.
cheers
Bill
--~--~-~--~~-
query params, updates, and
the result format for clients reading out of deployed Django services is
important. Please keep an eye on things like OpenSearch/A9, GData and
Atom Protocol.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are su
iable if not found instead of failing silently.
>
> Is this possible? It does not seems so with the current code.
I'd say verify the variable set in the view before you emit and fail at
that point. Failing at the template allows designers to break sites.
cheers
Bill
--~--~-~--~---
I'd assumed you were define variable values in one place and passing
them into a template to generate your configuration files from the view.
As an approach to verification, crashing the templating engine doesn't
seem necessary, but I don't understand your setup.
cheers
Bill
G
changing the slug
> field.
If it's an internal facing app, hide it with a CSS override.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
e =
> False (without the quotes) then it doesn't show up. With the quotes
> it does show up, but it is not editable.
Fix your primary_key value as well :)
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Groups. If Bobby and Suzie can't see each others files, give them a
group each. Make it so each group is bound to a folder; configure apache
as follows:
http://www.djangoproject.com/documentation/apache_auth/
using DjangoPermissionName to allocate/fake a group. Don't use an apac
to read the DATABASE_ENGINE from management.py would help.
Can it be picked by importing django.conf.settings, or is there some
other thing you need to do?
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
ort(), then your for tag loop isn't being entered.
datum = "@@@"
for tag in tags:
datum = "%s!!!%s - %s" % (datum, tag, handler.tags[tag])
print "about to render_to_response"
and see what comes out.
cheers
Bill
--~
customer
objects; let the feed act as the service endpoint.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegrou
How are you guys managing Django deployments? I'm tending towards upload
to server and reset the symlink (a bit more if the DB is changed between
releases), and was wondering how other folks are doing this.
cheers
Bill
Brett Parker wrote:
> Bill de hÓra <[EMAIL PROTECTED]> wrote:
>
>>>How are you guys managing Django deployments? I'm tending towards upload
>>>to server and reset the symlink (a bit more if the DB is changed between
>>> releases), and was wondering
to have a really satisfying argument over the merits of two
different kinds of tourniquet."
http://blogs.law.harvard.edu/philg/2003/08/12#a1186
cheers
Bill
Maniac wrote:
>
> Guido van Rossum:
>> Django's templating language is rich and powerful, but it doesn't look
> very Pythonic
>> to me -- in fact, it's so rich and powerful that it might as well be PHP
Django is so rich and powerful, Chuck Norris uses it.
cheers
Bill
engine will be looking for a
field called "yearkey" on the allyears dict rather than evalauting it
first *.
If so, is there an idiom for generically looping over dictionaries or
nested lists in templates?
cheers
Bill
* An aside. If instead of using a key on the allyears d
her abstraction/dsl than Rails or Django db mappings). In an
alternate universe, where there's time to do these things, I'd port
Archetypes/CMF onto Django.
cheers
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
than
magic removal going on). It needs to get merged back or killed.
Simulataneous releases will confuse people and enhance any perception
that Django is unstable not ready for production work. Parallel branch
management has really hurt the Zope community for example; there are
lots
I'm working on a small program that will help me in my dive shop. Since I'm
trying to learn to program in Python using Django, I wanted to create
something to help me. My issue is I cannot figure out how to center items
on my page. For example (see screen shot)
My code is located on Github:
Try this. I'm still learning myself
In your HTML file, you can use the img tag to display the image.
To check if the QR code is true or false, you can use Django's views.py
file. In your views.py file, write a function that will check the validity
of the QR code. The function should redirec
Thanks for your help.
On Tuesday, May 2, 2023 at 10:24:28 AM UTC-5 ALBERT ASHABA AHEEBWA wrote:
> I have centered the items and made a pull request.
>
> You can merge and see how it looks.
>
>
>
> Best Regards,
>
> Albert
>
> On Tue, 2 May 2023, 17:20 Will
y code is located at: https://github.com/wrnash1/ascubadiving
Thanks for any help on this application.
Bill
--
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 e
I do not see any error messages.
On Sunday, May 21, 2023 at 12:56:45 PM UTC-5 Abdulrahman Abbas wrote:
> Send your error message
>
> On Sun, May 21, 2023, 18:54 William Nash (Bill) wrote:
>
>> I'm new to django and I'm trying to learn as I program a small web
The system permission solved the issues. Thank you.
On Monday, May 22, 2023 at 10:51:13 AM UTC-5 Dev Femi Badmus wrote:
> I have similar error is due to system permission are you running on Linux?
>
> chown www-data:www-data /home/username/project-folder
>
> chown www-data:www-data /home/userna
I'd be interested to see a printout of 'columns' and 'cursor.description'.
One explanation would be that your for-loop is not actually accessing the
data that you think it is, or that your query is not actually fetching the
data that you think it is.
No criticism of your query implied - just
I two comments, and as always Your Milage May Vary.
- I wonder if you have the right indexes on your Postgres database? The
previous people report much faster completion times for test that use
Postgres as the database. Perhaps your domain is just hard (and you
description makes
I strongly recommend this approach:
My experience is that the best thing to do is to do minor upgrades - 1.8 ->
1.9.x -> 1.10.x -> 1.11.x (where x is the last patched version of each
minor version).
Further, at the completion of one Django version, I recommend saving a
snapshot of your datab
mend a UUID over exposing a primary key, hands down, all the
time, no exceptions.
-- Bill
--
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+
om
number generator in PyCrypto.
On Monday, October 22, 2018 at 10:20:02 AM UTC-4, Joel wrote:
>
> Thank you Bill. I had a look at UUIDs. One of the important criteria I
> had was that these IDs should be easily memorable. Unfortunately UUIDs
> are not memorable, being too long to remem
Joel said this was a requirement:
One of the important criteria I had was that these IDs should be easily
memorable. Unfortunately UUIDs are not memorable, being too long to
remember.
A primary key that appears in a URL is just an implementation detail - the
implementation could change, and
never used signals and I can't tell you anything more about that.
--- Bill
On Friday, November 2, 2018 at 10:35:52 AM UTC-4, Bartosz Gańcza wrote:
>
> Hi everyone!
>
> I am somewhat of a Django beginner and I can't seem to find an easy
> solution to what I need to do
Hope this helps
When working on an AWS Elastic Beanstalk instance, you can log into the
system using Secure Shell (SSH), with a key pair. For EBeanstalk, that key
pair was either created or selected from existing keys at the time that you
created the server.
>From there you have a typic
I hear good things about Django Girls (https://djangogirls.org/).
On Sunday, November 4, 2018 at 8:52:38 AM UTC-5, Expo Tor wrote:
>
> Anyone can recommend any online virtual groups for Django? I mean it
> should be sth more than online tutorials - where users can come in
> real-time with the
901 - 990 of 990 matches
Mail list logo