Re: Model Design

2022-05-05 Thread 'David Turner' via Django users
We receive the data every two weeks and then use django-import-export to import the data into our database. There is no mention of the account manager in these as this is something on our side. Am I missing the point in that by having the foreign key to the account manager this would impact on t

Expiration date option

2016-06-07 Thread 'David Turner' via Django users
Being new to Django I have a problem which I am not able to resolve. I have a model which has the following fields: expiry_date = models.DateField(null=True, blank=True,) has_expired = models.BooleanField(verbose_name='Has Expired', defau

Re: Expiration date option

2016-06-07 Thread 'David Turner' via Django users
, James Schneider wrote: > > On Jun 7, 2016 1:35 PM, "'David Turner' via Django users" < > django-users@googlegroups.com> wrote: > > > > Being new to Django I have a problem which I am not able to resolve. > > > > I have a model which h

Re: Expiration date option

2016-06-08 Thread &#x27;David Turner&#x27; via Django users
Many thanks for the answer especially the amount of detail in it. Best -david On 8 June 2016 at 09:26, James Schneider wrote: > > > > Many thanks for your answer which makes perfect sense and yes, this is > only required for a single view. > > The expiry_date is needed as items are listed by e

Re: Expiration date option

2016-06-08 Thread &#x27;David Turner&#x27; via Django users
Hi James Just one more quick question: I have two django models both containing the same information, temps and companies. The models both contain the following fields: odd days weekends nights emergencies Currently this allows me to filter on these fields in django admin. My question is would I

Re: Expiration date option

2016-06-13 Thread &#x27;David Turner&#x27; via Django users
Hi James Thanks for your answer as it has made me go back to putting business logic first which has then enabled me to come up with the right solution. Best -david On 10 June 2016 at 01:16, James Schneider wrote: > > > On Wed, Jun 8, 2016 at 9:25 AM, 'David Turner

Django Filter

2016-06-17 Thread &#x27;David Turner&#x27; via Django users
I am using django-filter I have create the the filter as follows: filters.py import django_filters from .models import Job class JobFilter(django_filters.FilterSet): class Meta: model = Job fields = ['practice_type'] And I have created the following view: from .models import

Re: Django Filter

2016-06-17 Thread &#x27;David Turner&#x27; via Django users
The issue is that one of the fields use choices. If I remove this everything is fine! On 17 June 2016 at 16:58, 'David Turner' via Django users < django-users@googlegroups.com> wrote: > I am using django-filter > > I have create the the filter as follows: > filter

Re: Best Practices URL Patterns

2016-07-06 Thread &#x27;David Turner&#x27; via Django users
As far as putting the id in the url it was a way of distinguishing the job form others. As I said a number of listings will be made on the same day with exactly the same content with regard to the title. My thoughts therefore were that if the id plus the tile were included in the url then this woul

Re: Best Practices URL Patterns

2016-07-07 Thread &#x27;David Turner&#x27; via Django users
ield isn't named slug, don't forget to set slug_field to the correct >> name. >> >> >> 2016-07-06 19:46 GMT+02:00 'David Turner' via Django users >> : >> > As far as putting the id in the url it was a way of distinguishing the >> j

Re: Best Practices URL Patterns

2016-07-07 Thread &#x27;David Turner&#x27; via Django users
g_field to the correct > name. > > > 2016-07-06 19:46 GMT+02:00 'David Turner' via Django users > : > > As far as putting the id in the url it was a way of distinguishing the > job > > form others. As I said a number of listings will be made on the same day

Re: Email List

2016-07-18 Thread &#x27;David Turner&#x27; via Django users
Hello Thanks for this. Would then the suggested route be to export my email list via an admin action and use this list via Sendmail? On 18 July 2016 at 15:11, Shem Nashon wrote: > Integrating email to django is a good but complex feature, My advice if > you want your emails in the inbox and no

Re: Generic Foreign Key

2016-07-21 Thread &#x27;David Turner&#x27; via Django users
Hi Thanks for this. So basically if I am using the county Foreign key in a few different models I am fine. I am not sure what you meant by this "as long as no models can link to notes or counties and not both, simple foreign key are fine." On 21 July 2016 at 11:13, ludovic coues wrote: > Gener

Re: Generic Foreign Key

2016-07-21 Thread &#x27;David Turner&#x27; via Django users
21 13:15 GMT+02:00 'David Turner' via Django users > : > > Hi > > > > Thanks for this. > > So basically if I am using the county Foreign key in a few different > models > > I am fine. I am not sure what you meant by this > > "as long as no mo

Re: Postcode Search

2016-08-25 Thread &#x27;David Turner&#x27; via Django users
Thanks for this but am looking for Uk Postcodes. Will continue my research. On 24 August 2016 at 15:10, Derek wrote: > The Google geocoding API can help - see: > https://developers.google.com/maps/documentation/geocoding/intro > Their example shows the ZIP code being returned in the JSON/XML res

Re: Postcode Search

2016-08-25 Thread &#x27;David Turner&#x27; via Django users
gt; > HTH > > On 25 August 2016 at 10:25, 'David Turner' via Django users > wrote: > > Thanks for this but am looking for Uk Postcodes. Will continue my > research. > > > > On 24 August 2016 at 15:10, Derek wrote: > >> > >> The Google g

Re: Template Data

2016-11-18 Thread &#x27;David Turner&#x27; via Django users
Thankyou for this, although for some reason it does not work. What other infromation would you need to further advise me. Thanks On 18 November 2016 at 13:42, Vijay Khemlani wrote: > In your model a contact may have multiple phone numbers (multiple > Contactnumber instances with foreign key to t

Re: What is the proper workflow before first migration?

2019-04-12 Thread &#x27;David Turner&#x27; via Django users
If you are using django allauth and include this in your settings.py ACCOUNT_EMAIL_VERIFICATION = 'mandatory' then you will be good to go. On Apr 12 2019, at 10:03 pm, Flip Matter wrote: > Django you so much, I believe having a separate Post model would be the way > to go. Recifes to get going o

Re: Link to urls containing slug

2017-01-31 Thread &#x27;David Turner&#x27; via Django users
I had tried that but unfortunately it doesn't work but thanks anyway. On 31/01/2017 14:57, Matthew Pava wrote: > > Assuming I’m understanding your question correctly, all you need to do > is reference get_absolute_url in your template. > > Something like so: > > > > {{ job_application }} > >

Re: Link to urls containing slug

2017-01-31 Thread &#x27;David Turner&#x27; via Django users
bApplication > model in order for that to work and that you passing job_application in > through the context in the template. > > If you don’t have that method, you could use the {% url %} tag, but you > would have to provide the pk and slug as arguments. > > slug=job_appl

Re: Link to urls containing slug

2017-02-02 Thread &#x27;David Turner&#x27; via Django users
Use the job object you passed into the detail view to > obtain the job_id and slug of the job. > > Thank you, > > Matthew > > > > *From:* 'David Turner' via Django users [mailto:django-users@ > googlegroups.com] > *Sent:* Wednesday, February 1, 2017 1:44 AM >

Re: Link to urls containing slug

2017-02-02 Thread &#x27;David Turner&#x27; via Django users
ag in your detail view template. >> >> Job >> Application Form >> >> >> >> I thought you had a JobApplication model, but you can use the Job model >> just as above. Use the job object you passed into the detail view to >> obtain the

Re: Custom Model Manager

2017-05-25 Thread &#x27;David Turner&#x27; via Django users
That would be fine if I was using 1.10 but this is a legacy system using 1.9. This will be upgraded in the foreseeable future to 1.11 Thanks On 25 May 2017 at 17:01, Melvyn Sopacua wrote: > On Thursday 25 May 2017 08:37:32 'dtdave' via Django users wrote: > > > > > My application model has fiel

Re: Custom Model Manager

2017-05-25 Thread &#x27;David Turner&#x27; via Django users
Apologies I was being really a bit too clever. I just need to put the deault manager first in my model and then use my custom manager in my view queryset and everything is fine. On 25 May 2017 at 18:01, David Turner wrote: > That would be fine if I was using 1.10 but this is a legacy system usin

Django and Plesk

2016-04-03 Thread &#x27;David Turner&#x27; via Django users
Does anyone have any advice/recommendations for hosting a Django Site via Plesk running Centos 6.5/nginx? Our understanding is that the ideal route is Passenger? Any advicerecommendations would be greatly appreciated. -- You received this message because you are subscribed to the Google Group

Re: Import a float field using a script

2019-10-16 Thread &#x27;David Turner&#x27; via Django users
Thanks for your response I am using djjango-extensions to run the script. Everything imports fine except the one field. The Category, Region, County and Iso’s are foreign keys to the property. The data in the csv for the area_hectares does contain in some cases no data but the format for the d

Re: Import a float field using a script

2019-10-16 Thread &#x27;David Turner&#x27; via Django users
gt; > On 16/10/2019 13.02, 'David Turner' via Django users wrote: >> Thanks for your response > > You're welcome. > >> I am using djjango-extensions to run the script. Everything imports fine >> except the one field. The Category, Region, County and I

Re: Import a float field using a script

2019-10-16 Thread &#x27;David Turner&#x27; via Django users
d > > On 16/10/2019 14.22, 'David Turner' via Django users wrote: >> Thanks for pointing me in the right direction. > > No problem. Happy to help. > > Just a pedantic note on your solution: > >> I added a simple >> try: >> y =