Hi,
I'm working through the tutorail. Part 1 was fine, and part 2 shows me the
site with the light blue background. I proceed to make my first app,
'djangotest'.
1. I run django-admin.py and get a project
2. I edit settings.py to select sqlite3, and put in an absolute path to
a sqli
On Friday, June 22, 2012 3:46:42 PM UTC-4, Bill Torcaso wrote:
>
>
> Hi,
> I'm working through the tutorail. Part 1 was fine, and part 2 shows me
> the site with the light blue background. I proceed to make my first app,
> 'djangotest'.
>
>1.
t User # Import the User Model so
> we can create a new user
> user = User.objects.create_user(username='someusername',
> password='somepassword', is_superuser=True) # Create the new User
> (Remember these credentials)
> user.save() # Save the User
&
Django is great, and the tutorial is great. I'm having a problem at the
very end of tutorial-4.
I try to use generic views, and I get an error when I Redirect from the
POST request in vote() to the Results page. Details below.
The tutorial code says to put this in my urls.py:
url(r'^(?P
will have a bad experience.
3. Visit all of my code and all of my templates, carefully converting
into the world of autoescape-on.
Thanks in advance,
--- Bill Torcaso
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
This is an indirect reply --- but I like the book "Two Scoops of Django".
It is a strong explanation of Django best practices. (The "scoops" are
scoops of ice cream in the fictional ice cream store of the examples).
Hope this helps.
On Thursday, February 22, 2018 at 7:22:36 AM UTC-5, Cictani
I have a concern about using environment variables to hold secret
information, and an opinion about it.
IF
DEBUG is enabled, and there is a 500 server internal error, and the default
500 template is used to render the response,
THEN
*all of your secret information is shown in the browser
I an new-ish to Django, and I ask this to hear from more experienced users
whether this would work at all, and whether it would be considered a good
or bad practice.
Goal: given an object and an integer index, retrieve the sub-object at that
index within the incoming object.
Method: Write a
I waited a while to answer this, and my answer comes in three distinct
parts.
#-
Question: what is the danger is using environment variables to hold secret
info?
Answer: The Django runtime will dump secret info from environment
variables into an HTTP response, in some c
I inherited a system which has one User model, and a Profile model that is
1-to-1 with User. The type-of-user information is carried in a required
"role" property in the Profile. I think that is a well-established
approach.
I am curious to hear what people think of the tradeoffs between (Use
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,
I ask this out of genuine curiosity -- how do you edit source code? I'm
wondering because that seems inseparable from how you structure your python
code into files.
I say this without any judgement. If your brain likes one method per file,
then you are asking your fingers and eyes to do more
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
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'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
Hello all,
The previous discussion shows a method that will work. but I think it has
disadvantages, and I want to suggest another approach.
The disadvantage of using a primary key from a table, any table, is that
you are committing to that table and that primary key for all eternity.
this
Joel,
I completely agree that UUIDs are not memorable.
I still think you would be well-served to make a UUID the basis for
uniquely defining a person. If you want to further add a short name, you
could make an object class that has a UUID and, say, an 8-digit number. If
you assert that the
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
If I understand your situation, you want to run a management command fairly
promptly after Django-server reboot, and not again for the duration of the
server's uptime.
Cron is useful and convenient for repeated tasks. And it can be made to
handle once-and-done tasks, if you keep a bit of stat
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
25 matches
Mail list logo