Re: Creating permalink for blog tags that have the Post class as foreign key

2012-06-24 Thread Matthew Meyer
n post.posttag_set.all(): tag.get_absolute_url() print the tag url exactly came as a surprise to me. On Sunday, June 24, 2012 8:40:25 PM UTC-4, Matthew Meyer wrote: > > Hi all, Django newbie here, > > I have a simple blog app I am working on and am trying to figure out the > be

Re: Creating permalink for blog tags that have the Post class as foreign key

2012-06-24 Thread Matthew Meyer
n post.posttag_set.all(): tag.get_absolute_url() print the tag url exactly came as a surprise to me. On Sunday, June 24, 2012 9:13:32 PM UTC-4, Russell Keith-Magee wrote: > > On Mon, Jun 25, 2012 at 8:40 AM, Matthew Meyer > https://mail.google.com/mail/?view=cm&fs=1&tf=1&so

Re: Creating permalink for blog tags that have the Post class as foreign key

2012-06-24 Thread Matthew Meyer
After making some changes debugging in the shell revealed, I have gotten it to work, thanks!!! On Sunday, June 24, 2012 9:13:32 PM UTC-4, Russell Keith-Magee wrote: > > On Mon, Jun 25, 2012 at 8:40 AM, Matthew Meyer > https://mail.google.com/mail/?view=cm&fs=1&tf=1

Help getting my first django site deployed! (heroku)

2012-07-04 Thread Matthew Meyer
Hello all! I am in the process of deploying my first django site: http://pure-mist-4298.herokuapp.com/ Currently, I have two major issues I am unsure how to resolve. 1. Something is messed up with my database settings. I followed this tutorial to get started: https://devcenter.heroku.com/arti

render a models slug field as a url

2012-07-24 Thread Matthew Meyer
Hello all, I'm trying to load the url of a model created with get_absolute_url() programmatically in my view. There are basically three steps I need to accomplish this: 1. make sure @permalink is working correctly. This step I am fairly confident I have completed. Here is the model I use: htt

Re: render a models slug field as a url

2012-07-25 Thread Matthew Meyer
ling the same view for different urls. Any thoughts on where I would begin to for rendering a template at the redirected url? Thanks, Matt On Wednesday, July 25, 2012 6:29:42 AM UTC-4, Daniel Roseman wrote: > > > > On Wednesday, 25 July 2012 02:42:45 UTC+1, Matthew Meyer wrote: >> &g

Re: render a models slug field as a url

2012-07-26 Thread Matthew Meyer
That was it, it is working now. Thank you so much Daniel! :) On Thursday, July 26, 2012 4:25:10 AM UTC-4, Daniel Roseman wrote: > > On Thursday, 26 July 2012 03:45:41 UTC+1, Matthew Meyer wrote: >> >> HI daniel, thanks for the reply >> >> After your comments, I have

custom management commands: AttributeError: 'module' object has no attribute 'Command'

2012-08-10 Thread Matthew Meyer
I am trying to make a custom management command as show in the docs here: https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ When I try to run the command from my project directory I am experiencing the following error: AttributeError: 'module' object has no attribute 'C

how to “break” from a regex in urlconf

2012-08-26 Thread Matthew Meyer
I have the following views: def tag_page(request, tag): products = Product.objects.filter(tag=tag) return render(request, 'shop/tag_page.html', {'products': products, 'tag': tag}) def product_page(request, slug): product = Product.objects.get(slug=slug) return render(reque

Re: how to “break” from a regex in urlconf

2012-08-27 Thread Matthew Meyer
Fantastic solution, thank you so much. I will be sure to loose those phrases from my vocab as well :) On Monday, August 27, 2012 3:18:52 AM UTC-4, Melvyn Sopacua wrote: > > On 27-8-2012 4:14, Matthew Meyer wrote: > > > So the question: Is there a way I can keep the fle

Unable to access data in field during migration v1.7c2

2014-08-08 Thread Matthew Meyer
I have a model with a FK to a field called employee. I'm trying to migrate it to django.contrib.auth.models.User. I call a migrations.RunPython command and when I try to access the data in the field before I migrate it and after I have updated the model it is not giving me the correct data. If

Re: Unable to access data in field during migration v1.7c2

2014-08-11 Thread Matthew Meyer
I am using apps.get_model but it seems to be giving me the model as it exists in the models.py and not the model before migrations that is currently part of the database. On Monday, August 11, 2014 4:31:24 AM UTC-5, Daniel Roseman wrote: > > On Friday, 8 August 2014 16:51:52 UTC+1, M

Trying to migrate data and not getting correct data out of a field 1.7c2

2014-08-13 Thread Matthew Meyer
I've attached an example project that recreated the error. Basically I created a profile and then setup some relations to it. When I change the relation from the profile to the User model and try to access the data after the models.py file has been changed but before the migration has been comp