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
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
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
I wonder if this is a case you want to catch and *not* warn about.
In my case, I'm doing a:
haves =
MyModel.objects.filter(foreign_relationship=4).order_by('foreign_relationship__value',
'common_key')
havenots = MyModel.objects.exclude(id__in=haves).order_by('common_key')
query = haves.union(
Hi guys,
I just finished learning python on sololeran.com.
And I wanna start django, so I was wondering If anybody would wanna help me
personally.
Like I said I have a fair knowledge about python.
I would be grateful.
thanks,
On Sat, 9 Feb 2019 at 11:43, PASCUAL Eric wrote:
> Hi,
>
> Templates a
On Tuesday, May 29, 2018 at 12:09:46 PM UTC-7, Rich Rauenzahn wrote:
>
>
> Is this possible? How?
>
>
Ah, found this thread which suggests just using sqlite locally... I'll give
it a try:
https://groups.google.com/forum/#!topic/django-users/jxkTmibjmX4
--
You received
I'm using Django's (1.11) typical default db for my regular Django
development, but I need to integrate with someone else's bugzilla db server
running on mysql somewhere else (no web api available, mysql is the
recommendation from them). So I've added a 2nd DB to my DB config
pointing to th
's written) for
companies, contacts, and other sales information. I've not before used
grids or forms so these are new to me and having a template I can modify
(or use for ideas) would be very helpful. Pointers appreciated.
Rich
--
You received this message because you are subscr
I've not received messages from this mail list since last summer. I now
have a need to communicate with others and learned that I'm still subscribed
so I want to learn if this message posts and is sent back to me by the MLM.
Rich
--
You received this message because you are subscri
fully quiet.
Rich
--
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 post to this group, send email
the SlackBuilds.org packages.
My question is how to migrate both django and my project to the new
virtual environment.
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
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
#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
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
7;),
('Law'),
('Manufacturing'),
('Mining'),
('Municipalities'),
('Ports/Marine Services'),
('Transportation'),
)
industry=models.CharField(max_length=24, choices=industry_choices,
default='Agriculture')
Thanks,
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
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
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
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
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
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
in django (1.11.2 currently installed). Pointers to the appropriate docs
much appreciated.
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
;: '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
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
ll specify unique_together()
for the columns that would have comprised the PK?
Regards,
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
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
;, '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
ances/#django.db.models.Model.clean
Mike,
I'll read how to use these.
Thanks,
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
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
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
rs to work in their own database area and keeps users from
areas assigned to others. This is independent of the django project/app code
arrangement.
Thanks again,
Rich
ch in his/her own private section. How to do this may be
in 2 scoops, or may not. If I don't see how to do this I'll be back with
more questions.
Thanks,
Rich
xample of how to set up and structure
such an application please point me to it so I can learn from success.
Pointers, references to docs or web sites will be appreciated and used.
TIA,
Rich
On Sat, 29 Oct 2016, m1chael wrote:
https://docs.djangoproject.com/en/1.10/howto/legacy-databases/
I missed seeing that. Thanks very much.
Rich
Is there a tool to convert postgres DDL to django model syntax? It would
sure save a lot of time and effort if there is a converter.
Rich
closer to interpolation speed.
Perhaps that is my best answer.
Any thoughts or pointers on my predicament?
Thanks!
Rich
--
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, se
look at the last two URLs first; need to install requirements before
trying django-timepiece.
Regards,
Rich
The django-timepiece project requires a tool called 'less,' a css
preprocessor. However, on linux systems (if not also other unices)
/usr/bin/less is a pager with greater capabilities than more.
Is there a conflict between these two? Where would the css-less be
installed?
TIA,
Rich
On Fri, 2 Sep 2016, Rich Shepard wrote:
I'll definitely look at the project management packages.
It appears that django-timepiece will fulfill my needs.
Thanks again,
Rich
rch string than those I used. I'll definitely look
at the project management packages.
Much appreciated,
Rich
nvert the time card records into a line-item invoice, and I
find nothing suitable in my Web searches (because they either do not run on
linux or require MySQL as the backend database.
It should not be too difficult to put together this application if one's
not already available.
TIA,
Rich
t page but when time permits I'll
look around and see if I can find the source. Wonder if it's written in
LaTeX; if so, the typefaces can easily be change.
Thanks,
Rich
revised version released.
Thanks in advance,
Rich
e no reason to get a newer, but still two versions
behind, copy.
Thanks very much,
Rich
you've given me an alternative approach for my application slightly
different from Lee's way of presenting it. Much to think about before I
proceed.
Much appreciated,
Rich
,
you can rearrange.
No, not on this project. But the next one will require more apps because
it has more functional groupings.
Many thanks again,
Rich
ones is
not always easy.
Thanks very much,
Rich
represent
individual tables? That is, should my project have a separate app for each
table with its models, templates, and views with templates of joined tables
in the main project subdirectory? Or are all tables in a single app?
TIA,
Rich
h project) will not be onerous.
Suggestion taken,
Rich
On Tue, 23 Aug 2016, François Schiettecatte wrote:
I would add a +1 for git, I started off with svn and switched to git,
branching and merging is much easier which really helps when you want to
test ideas.
François,
Thanks for your insight,
Rich
served me well since I replaced CVS with it. Backups
are daily (using dirvish) and since the repository's been in the same place
for almost a couple of decades it's not likely to be moved. :-)
Thanks for confirmation,
Rich
is insufficient.
Rich
erience I want to learn how best to organize everything.
Thanks for the insights,
Rich
On Tue, 23 Aug 2016, Carsten Fuchs wrote:
I cannot remember where is was stated, but iirc another reason for the
“project-under-the-project” subdirectory was that it is considered not as
app, but rather as “site”.
Carsten,
Thanks for the clarification. That helps.
Rich
that import in the tutorial.
Thanks!
Rich
Reading the doc for DateField() I tried to set the default as today's
date, but 'default=date.today' is not accepted.
If there is a way to set today's data as the default for a DateField()
please point me to the doc for it.
Thanks,
Rich
ls.py
and I wonder why the project-related files in this subdirectory are not
under the parent project directory. In other words, why is there a project
subdirectory under the project directory?
Thanks,
Rich
ut overlooked the implications.
Thanks very much,
Rich
py
These were created by the startproject command.
Now knowing how I dug this hole I'm in I'd appreciate your teaching me how
to get out of the hole and move on.
Rich
On Tue, 16 Aug 2016, Avraham Serour wrote:
https://virtualenv.pypa.io/en/stable/
Thanks, Avraham. Looks interesting.
Rich
On Tue, 16 Aug 2016, Avraham Serour wrote:
you should also create a virtualenv for the project
Avraham,
OK. Please point me to some docs for this.
Regards,
Rich
On Mon, 15 Aug 2016, Rich Shepard wrote:
I'll have to learn how to get it to install in -3.5.2, too.
Found the answer: pip3.
Rich
ate them in a single application.
Will use python3, however.
Thanks,
Rich
bdirectory.
I'll have to learn how to get it to install in -3.5.2, too.
Thanks,
Rich
pose there's no reason to not use python-2.7.5 installed here for
this project, unless you advise me otherwise. I also need some advice and
guidance on how to proceed on creating a django application from the php
source files.
TIA,
Rich
On Friday, May 6, 2016 at 4:11:42 AM UTC-7, Alasdair Nicol wrote:
>
>
>>
>> But In this particular run I'm currently tracing, rich is already in the
>> db (as the only entry) as pk=5 (via fixture loading process). For one,
>> this tells me the sequence
On Thursday, May 5, 2016 at 4:22:11 PM UTC-7, Mike Dewhirst wrote:
>
> Are you using setUp() and tearDown() as class methods in your test class?
>
>
No, the code was using setUpClass(), which is a classmethod.
--
You received this message because you are subscribed to the Google Groups
"Djan
I've been tracing into django core code, and it looks to me that I have a
case where the fixture has a auth.User(username=rich) with a pk=1 in the
fixture. But sometimes as the User fixture with pk=1 is being added
(updated?) through Model._save_table(), the same User with pk=5 is alread
I'm having a strange problem. My test environment has been working fine,
but I am upgrading my environment's Django revision slowly, which means I
also need to move away from django-nose's FastFixtureTestCase.
I'm now at Django 1.7. I have a TestCase which is more or less...
class Foo(TestC
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
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 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
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
>>
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
_fields=d.keys())
Now, I know I can just make my own mixin (maybe add a save_dict()) to do
this, but it seemed like something worth sharing.
Rich
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group an
No virtualenv on the machine, so
that's the same, and then mod_wsgi was version 2.6 and so is Python.
No matter now, but the mystery remains.
On Fri, Feb 14, 2014 at 1:34 AM, Tom Evans wrote:
> On Fri, Feb 14, 2014 at 12:38 AM, Javier Guerra Giraldez
> wrote:
> > On Thu, Feb 1
Said fuck it, gave up and used Nginx + Gunicorn.
We're good now. No idea what the hell was happening, but this works now.
Humbling to realize how little I know about the ORM internals.
Thanks for listening,
R
On Thu, Feb 13, 2014 at 3:13 PM, Rich Jones wrote:
>
> > Please sh
cation does _run_ with Apache, it is only
on calls related to user.get_profile() which causes the problem.
Is there anything else you'd need to know?
On Thu, Feb 13, 2014 at 3:01 PM, Tom Evans wrote:
> On Thu, Feb 13, 2014 at 6:00 AM, Rich Jones wrote:
> > Hey guys!
> >
Ah, okay, noted, although I believe this may be a bug in Django itself but
want to exhaust everything before I open a ticket.
--
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
Since this seems to happening at a pretty deep level, would it be uncouth
to kick this over do django-dev?
On Thu, Feb 13, 2014 at 9:17 AM, Rich Jones wrote:
> Yes, all of these things worked just fine. The code is in the _same
> location_ on the _same machine_ with the _same settings_ a
is trying to put user into a field
> instead of treating it as a table.
> Basic sanity checks :
> - is the djagno versions on both production and local same ?
> - same for wsgi and apache ?
> - syncdb worked fine ?
>
> V.
>
>
>
> On Thu, Feb 13, 2014 at 11:30
bose_name=_('user'),
related_name='profile')
Can anybody help me? I'm going nuts over here. I just don't know why the
behavior would be different for runserver and Apache!
Any ideas?
Thanks so much!,
Rich
--
You received this mes
As with all software the best solutions are written to solve a problem that
bugs the developer. Find something that you find troublesome on a regular
basis, then code a solution.
Sent from my iPhone
> On Oct 12, 2013, at 12:26 AM, jasvir singh
> wrote:
>
> Hello everyone.
>
> I am new to t
Try one of the following:
Gondor
GoogleApp Engine
Heroku
On Tue, Sep 10, 2013 at 3:55 PM, Andre Lopes wrote:
> Hi all,
>
> I'm stuck with Django hosting. I've A2hosting but the Django hosting
> is not good at all.
>
> They use FCGI and Passenger and both have a problem.
>
> If I'm more than 15
Personal preference. Python has excellent libraries to support parsing both
JSON and YAML.
Sent from my iPhone
On Aug 30, 2013, at 7:34 AM, Floor Tile wrote:
> Helle everybody,
>
> Just a short and simple question:
>
> It seams that both JSON and YAML can be used for initial data loading. (
g the
questions you will ask.
Cheers,
rich
On Tue, Aug 20, 2013 at 12:48 PM, Sergio Infante Montero <
raulserg...@gmail.com> wrote:
> Maybe, you need some book like this
>
> https://django.2scoops.org/
>
> Regards
>
> On Tue, Aug 20, 2013 at 11:21 AM, Marcos Moyano
>
I found my problem... I had 2 different templates created with the
same code and I was using the wrong one
On Feb 19, 9:53 am, Rich wrote:
> Hi I am pretty new to django and I feel like I either have some kind
> of configuration wrong or maybe im not understanding how something
&
Hi I am pretty new to django and I feel like I either have some kind
of configuration wrong or maybe im not understanding how something
works.
Whats happening is when I make a small change in one of my templates,
the change is not reflected on my site.
I have noticed that if I make significant ch
to see if this is a valid URL. I
would like this to be unvalidated instead.
How do I go about changing it? Will I need to do a database migration
to do this? Or can I just add a 'verified=False' and run syncdb?
Thanks so much!
Rich
--
You received this message because you are subscribed
e useful.
Thanks so much!
Rich
--
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@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
it of money
to work on an open source project.
Rich
--
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@googlegroups.com.
To unsubscribe from this group, send email to
django
Even ignoring the select_related then - the fact is that
user.post_set works and user.betterpost_set won't work, seemingly as
the result of using model inheritance.
Perhaps I could get all of the posts (post and betterposts) and then
filter by time? Does that make sense / is there a way to do tha
the below example you pasted
> is invalid code (i.e. you need to add a proxy _meta??).
> My apologies if I'm wrong though, as I have never encountered a need to do
> this before, and just going off vague memory.
> Cal
> On 23/06/2011 19:24, Rich Jones wrote:Other than the c
Other than the convenience of writing them, I can't seem to find any
advantages of using model inheritance.
Please allow me to explain the trouble I am having with an example.
Suppose,
class Post(models.Model):
title = models.CharField(max_length=200)
user_owner_id = models.ForeignKey(Use
Dear all
We have an opening for a Django/Python developer. Role is based in the
Midlands, UK. Great environment, great team. Get in contact for more
details.
Thanks
Rich
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Django framework comes with a reset password out of the box feature.
I would like to modify this to where a password is sent to the user
via e-mail. I looked at the code in django\contib\auth\views.py
I'm not sure how I can modify it.
Django Reset Password
The Django framework comes with s
1 - 100 of 133 matches
Mail list logo