assume the topmost one is the Django project name, but what is the second
one? If I want to invoke the application using 'edb' as the application
name, which directory needs to be renamed?
Looking forward to learning,
Rich
y with the same name. I
assume the topmost one is the Django project name, but what is the second
one? If I want to invoke the application using 'edb' as the application
name, which directory needs to be renamed?
Looking forward to learning,
Rich
ching me how to write this.
If you would be willing to look at the module, show me how to write the
two conditions above, and check syntax on the all 5 classes in it I will
send you the file off the mail list.
Rich
ances/#django.db.models.Model.clean
Mike,
I'll read how to use these.
Thanks,
Rich
;, 'person', 'proj_nbr')
Use the model's clean() method ...
https://docs.djangoproject.com/en/1.8/ref/models/instances/#django.db.models.Model.clean
This I'll need to ponder more to figure out where to put the clean method
so it validates entries before they're saved.
Thanks,
Rich
hods after I get the multi-variable PKs
correct.
Another place I sometimes use is the save() method. Django also provides
pre_save and post_save hooks so you never need to use database triggers.
This goes beyond what I've learned. I'll get there step-by-step.
Yes, you are helping me smooth off the rough spots.
Thanks,
Rich
on? When I want to limit acceptable strings in a
data entry field to a provided list, as in postgres's check constraint? Is
Mike's suggestion of clean() the way to handle these?
Thanks very much,
Rich
ll specify unique_together()
for the columns that would have comprised the PK?
Regards,
Rich
ell as higher-level validation in Python.
As I thought. I did not think of adding the UNIQUE constraint to the
appropriate fields, but will.
Many thanks,
Rich
;: 'rshepard',
'PASSWORD': '',
'HOST': '',
'PORT': '5432',
}
}
Again, this is for my use and the database with its existing tables lives
in the same cluster with all my other databases. And, each table will be a
separate app; the models have been translated from sql to django.
I'd appreciate suggestions on how to proceed.
Rich
he default settings.py and changed the db name
without noticing that it does not need the default path in the file.
Thanks,
Rich
in django (1.11.2 currently installed). Pointers to the appropriate docs
much appreciated.
Rich
bit more research, then add the name to the
appropriate county list. Example, Drewsey in Grant Co.
Do all cities cleanly break into one county?
As far as I know, yes. At least in OR, WA, ID, NV, UT, WY, and MT. Some
cities are counties, I believe, and in New York City each borough is a
separate county.
Thanks,
Rich
On Wed, 28 Jun 2017, Rich Shepard wrote:
appropriate county list. Example, Drewsey in Grant Co.
Oops! Drewsey is in Harney Co.
Mea culpa!
Rich
On Wed, 28 Jun 2017, Rich Shepard wrote:
Yes, that's the way to do it. I wrote my first idea before realizing that
two models/tables would be the way to go.
After further consideration I realized that a single model/table is the
way to go. Because each city needs to be associated w
city_name,county_name) VALUES
('Bend','Dechutes');")
repeated for each row in the table (easy to do with emacs)? And, can I put
this code in models.py after the classes?
Rich
ently exist in the
database. If the above is the preferred solution with an existing table,
then to add the table and date I can use the psql shell to read the file.
Thanks very much for clarifying,
Rich
x27;, 'Business, other', 'Chemicals',
'Energy', 'Law').
In postgres SQL this would be a constraint check. How do I write this in a
django Model.clean or its relatives?
Rich
7;),
('Law'),
('Manufacturing'),
('Mining'),
('Municipalities'),
('Ports/Marine Services'),
('Transportation'),
)
industry=models.CharField(max_length=24, choices=industry_choices,
default='Agriculture')
Thanks,
Rich
key-value pair, where the
first item is the key (literally is the value that is saved on the DB
field), and the value is the "display value".
Guilherme,
I missed the first sentence when I looked at the page. Your third
paragraph explains the syntax very clearly. I'll change the code to comply.
Thanks very much,
Rich
#x27;s F/OSS, enterprise-class, suitable for a single user, and
has outstanding support on the maillists. I've used it for 20 years and am
now running version 9.6.3 for my own (and client) applications.
Rich
use, a client relation management application
(which will go to github when done). I want to avoid name conflicts with app
names so my first inclination is to define one app as data and another as
reports.
Please suggest appropriate app names if these would be problematic.
Rich
ds so variables, classes, attributes, etc. do not use those
names. If Django has no issues with naming apps 'client_data' and 'reports'
I'll use those names because they clearly express their purpose.
Thanks,
Rich
the SlackBuilds.org packages.
My question is how to migrate both django and my project to the new
virtual environment.
Rich
Dear All,
I'm new to the Django ORM, and quite new to ORMs in general. I have two
models (lets call them A and B) between which I have an interesting
mapping. There are precisely 2 B instances associated with each A
instance. Each A instance can have many B instances. The order of Bs are
i
Oops sorry I meant every B instance can have multiple A instances. Sorry!
On Thursday, 30 July 2015 16:21:37 UTC+1, monoBOT monoBOT wrote:
>
>
> 2015-07-30 16:08 GMT+01:00 Rich Lewis >:
>
>> There are precisely 2 B instances associated with each A instance. Each
>>
Hi Tom,
That was approximately what I was planning to do, I shall do some
experimenting to see if I can do any more. I was just wondering if there
was a clever feature for this sort of thing, as ORMs seem pretty magic
already!
Thanks,
Rich
On Thursday, 30 July 2015 17:15:40 UTC+1, Tom Evans
here:
https://gun.io/blog/announcing-zappa-serverless-python-aws-lambda/
Watch a screencast here:
https://www.youtube.com/watch?v=plUrbPN0xc8&feature=youtu.be
And see the code here: https://github.com/Miserlou/django-zappa
Comments, questions and pull requests are welcome!
Enjoy,
Rich Jones
Hi,
I'd like to make a mixin to set the placeholder text in the widget attrs.
Reading this https://code.djangoproject.com/ticket/5793, it seems that
extending Meta for custom fields is somewhat discouraged.
Would the following be the recommended way to do it? Just adding a class
variable to t
This is heads up in case anyone sees something similar:
I have managed to trigger this degenerate query case in two completely
different Django 2.2 projects. In production with a normal sized dataset,
the query time is fine. But during unit testing with a small subset of the
data, the querie
about the migration process to know
what to look for.
...I'm surprised it even works given that the database is already migrated
once -- shouldn't the 2nd migrations fail?
I'm not expecting an answer -- I think there's not enough information.
But where should I dig?
Rich
then
sort the operations by this priority before they are emitted into a
migration.py.
Or any other ideas to make this a bit more seamless?
Rich
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and sto
t, the
more
money you make - as well as everyone else on the list! In this
situation your job is to let as many people see this letter as
possible. So they will make you and me rich You can even start
posting the moment your email is confirmed. Payments will still
appear
in your PayPal account even
101 - 133 of 133 matches
Mail list logo