Problem serving files from media directory

2012-08-27 Thread neridaj
Hello, I've deployed a new website to my staging and production servers but for some reason the images in the media directory are displaying 404 errors. The path to the image is correct and the image is located at that path: ls -la

Problem serving files from media directory

2012-08-27 Thread neridaj
Hello, I've deployed a new website to my staging and production servers but for some reason the images in the media directory are displaying 404 errors. The path to the image is correct and the image is located at that path: ls -la

Re: 404 only in Chrome

2011-12-10 Thread neridaj
I think it might be related to a jquery plugin i'm using. It appears that the plugin is not finding an attribute on an image, and is therefore appending the undefined status to the url in developer tools. If I comment out the plugin the error is gone. On Dec 10, 7:36 am, Tomasz Zieliński

Re: 404 only in Chrome

2011-12-09 Thread neridaj
the end of the regular expression string. Without > it, /portfolio/ will match with /portfolio/funstuff, > /portfolio/?my_hax_rock, etc. See if that helps. > > Furbee > > > > > > > > On Fri, Dec 9, 2011 at 5:33 PM, neridaj <neri...@gmail.com> wrote: >

404 only in Chrome

2011-12-09 Thread neridaj
Hello, For some reason I'm getting a 404 in google chrome when I visit / portfolio/. The url entered is /portfolio/ but it returns as a 404 at / portfolio/undefined/ in the chrome developer tools window. I read a post about some issues with chrome handling errors and to resolve it by unchecking

Re: Serving static files weirdness

2011-07-08 Thread neridaj
, not relative paths. os.path.join(PROJECT_ROOT, 'static'), ) On Jul 8, 2:47 pm, neridaj <neri...@gmail.com> wrote: > I'm using Django version 1.3 and the Django devserver. My admin media > is the default: ADMIN_MEDIA_PREFIX = '/static/admin/' > > On Jul 8, 1:49 am, bruno desthu

Re: Serving static files weirdness

2011-07-08 Thread neridaj
I'm using Django version 1.3 and the Django devserver. My admin media is the default: ADMIN_MEDIA_PREFIX = '/static/admin/' On Jul 8, 1:49 am, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On Jul 8, 4:40 am, neridaj <neri...@gmail.com> wrote: > > &g

Serving static files weirdness

2011-07-07 Thread neridaj
I had my static files being served form media i.e., the tree looked like this: media/ /css /js /images with this in my url conf: if settings.SERVE_MEDIA_FROM_DJANGO: urlpatterns += patterns('', (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': r'media'}),

Work around restarting server on image uploads?

2011-04-25 Thread neridaj
Hello, Is there a way to get uploaded images to render without having to restart the server? Whenever I add a new image via the admin interface I have to restart apache in order for the images to render. Thanks, Jason -- You received this message because you are subscribed to the Google

mysql -> sqlite3 migration error

2011-01-21 Thread neridaj
I'm trying migrate some tables for the first time and I'm not sure how to resolve this error. It looks like things fail when this file is called: films:0006_migrate_country, which in turn is failing to create the films_filmdistribution table. Any thought on how to resolve this? Thanks for any

Re: ProgrammingError: relation "project_webproject" does not exist

2010-03-17 Thread neridaj
I restarted my server and the images now display. I don't understand why I need to do that for the images to show up. On Mar 17, 12:30 pm, neridaj <neri...@gmail.com> wrote: > Hello, > > I've been working on a portfolio website that includes an app called > project

ProgrammingError: relation "project_webproject" does not exist

2010-03-17 Thread neridaj
Hello, I've been working on a portfolio website that includes an app called projects. Within this app are the models WebProject and ScreenShot for project info and related screenshots for display on the portfolio page. Everything has been working fine up until now, when I try to add another

generic view confusion

2010-03-01 Thread neridaj
I don't understand why my template_object_name is empty in a generic object_list view. I'm trying to grab all the category names and urls from my Category model but it's turning up empty, at least {{ category_list|length }} yields 0. I'm trying to add this info to the sidebar of a generic

Problems with PIL after upgrading to OSX 10.6.2

2010-02-17 Thread neridaj
I'm having problems with PIL after upgrading to OSX 10.6.2 and was wondering if anyone else had similar issues or found a fix. I'm getting the error: The _imaging C module is not installed, so I tried reinstalling PIL which resulted in the following error: lipo: can't figure out the architecture

how to define DJANGO_SETTINGS_MODULE for multiple sites.

2010-02-08 Thread neridaj
I'm trying to setup my first cron job and I think the reason my script is not running is because I don't have DJANGO_SETTINGS_MODULE defined for my environment i.e., .profile script. I'm using mod_wsgi so my DJANGO_SETTINGS_MODULE is defined in the respective wsgi file for each site, so my

DJANGO_SETTINGS_MODULE is undefined

2010-02-03 Thread neridaj
I'm getting this error even though my DJANGO_SETTINGS_MODULE is defined in my wsgi file: import os, sys sys.path.append('/home/username/public_html/mysite.com') sys.path.append('/home/username/public_html/mysite.com/mysite') os.environ['PYTHON_EGG_CACHE'] = '/home/username/public_html/

Practical Django Projects blog app admin not showing entries with draft status

2010-02-03 Thread neridaj
I'm following along James Bennett's tutorials and when I save an entry as a draft it doesn't show up in the admin interface for further editing. When I log in with psql I can see the draft in the database but the admin doesn't show the draft in the entries, however the draft is listed in the

Re: contrib.comments get_absolute_url raising 404 only on remote server

2010-01-12 Thread neridaj
Thanks, man, that was it. On Jan 12, 3:39 am, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On 12 jan, 03:32, neridaj <neri...@gmail.com> wrote: > > > I've been testing my site locally and figured I should commit some of > > my changes. I'm

Re: Updated to revision 12207, now CSRF verification failed. Request aborted.

2010-01-11 Thread neridaj
I guess I had to add the middleware even though I'm using django.contrib.comments and generic views? On Jan 11, 7:12 pm, neridaj <neri...@gmail.com> wrote: > what's up with this now. I'm suing contrib apps and generic views > i.e., no middleware needed, and I've added {% csrf_token %

Updated to revision 12207, now CSRF verification failed. Request aborted.

2010-01-11 Thread neridaj
what's up with this now. I'm suing contrib apps and generic views i.e., no middleware needed, and I've added {% csrf_token %} to my POST forms but can't get rid of this. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

contrib.comments get_absolute_url raising 404 only on remote server

2010-01-11 Thread neridaj
I've been testing my site locally and figured I should commit some of my changes. I'm using django.contrib.comments and for some reason the comment.get_absolute_url is resulting in a broken link on the live server. When I mouse over the link the status bar reads the link correctly i.e.,

context processor var empty

2010-01-09 Thread neridaj
I'm trying to use a context processor to make all of my blog entry titles available for an ajax autocomplete search box but for some reason the var returned from the context processor is empty. from blog.models import Entry # search/context_processors.py def search(request): data =

Re: why does if statement fail with

2010-01-09 Thread neridaj
Template error: In template /Users/username/django-sites/username.com/public/templates/ tagging/tag_list.html, error at line 17 'if' statement improperly formatted 7 : {{ object.name }} 8 : 9 : 10 : {% endfor %} 11 : 12 : 13 : {% if

Re: why does if statement fail with

2010-01-07 Thread neridaj
Yeah, I guess an error would help, oops. I just get 'if' statement improperly formatted. This is the only if statement that has failed. On Jan 7, 9:13 pm, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Fri, Jan 8, 2010 at 1:10 PM, neridaj <neri...@gmail.com> wrote: &g

Re: why does if statement fail with

2010-01-07 Thread neridaj
I'm using 1.2: >>> django.VERSION (1, 2, 0, 'alpha', 0) On Jan 7, 8:54 pm, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Fri, Jan 8, 2010 at 12:50 PM, Eric Abrahamsen <gir...@gmail.com> wrote: > > > On Jan 8, 2010, at 12:28 PM, neridaj wrote: > &

why does if statement fail with

2010-01-07 Thread neridaj
Can anyone tell me why this less than symbol is causing this if statement to fail? {% if page_obj.number|add:"4" < paginator.count %} {% endif %} Cheers, J -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Totally confused on categorized feeds

2009-12-30 Thread neridaj
I've been following along James Bennett's Practical Django Projects and I'm confused on how to render a template with the correct url that maps to the urlconf for categorized feeds. I understand that the url needs to be in the form feeds/categories/audio but how do I build this url in the template

Re: local variable 'delta' referenced before assignment

2009-12-29 Thread neridaj
I guess I was mixing tabs and spaces, thanks guys. On Dec 29, 3:38 pm, Ramiro Morales <cra...@gmail.com> wrote: > On Tue, Dec 29, 2009 at 8:31 PM, neridaj <neri...@gmail.com> wrote: > > File "/Users/jasonnerida/django-apps/blog/models.py" in > > moderate_co

Re: local variable 'delta' referenced before assignment

2009-12-29 Thread neridaj
-apps/blog/models.py" in moderate_comment 142. if delta.days > 30: Exception Type: UnboundLocalError at /comments/post/ Exception Value: local variable 'delta' referenced before assignment On Dec 29, 3:29 pm, Chris Withers <ch...@simplistix.co.uk> wrote: > neridaj wrote: > &g

local variable 'delta' referenced before assignment

2009-12-29 Thread neridaj
I don't see why this error is happening, the var is assigned. def moderate_comment(sender, **kwargs): instance = kwargs['instance'] if not instance.id: content = instance.content_object if isinstance(content, Tweet): delta =

Re: don't understand why isinstance returns false

2009-12-29 Thread neridaj
fixed. On Dec 29, 1:38 pm, neridaj <neri...@gmail.com> wrote: > def moderate_comment(sender, **kwargs): >         instance = kwargs['instance'] >         if not instance.id: >             content = instance.content_object >             if isinstance(content, Tweet): >  

don't understand why isinstance returns false

2009-12-29 Thread neridaj
def moderate_comment(sender, **kwargs): instance = kwargs['instance'] if not instance.id: content = instance.content_object if isinstance(content, Tweet): delta = datetime.datetime.now() - content.pub_time delta =

mapping url to feed

2009-12-27 Thread neridaj
I'm trying to retrieve blog entries for a specific category and I'm not sure how to generate the correct url in my template. here is what I have: {{ category.title }} feeds = { 'entries': LatestEntriesFeed, 'links': LatestLinksFeed, 'categories': CategoryFeed, 'tweets': LatestTweetsFeed }

mapping url to feed

2009-12-26 Thread neridaj
I'm trying to retrieve blog entries for a specific category and I'm not sure how to generate the correct url in my template. here is what I have: {{ category.title }} feeds = { 'entries': LatestEntriesFeed, 'links': LatestLinksFeed, 'categories': CategoryFeed, 'tweets': LatestTweetsFeed }

get_absolute_url not recognized

2009-12-22 Thread neridaj
I'm trying to add a get_absolute_url method to a Tweet model from django-syncr and do not understand why the method is not recognized. class Tweet(models.Model): pub_time= models.DateTimeField() twitter_id = models.PositiveIntegerField() text= models.TextField() user

Re: Hosting for django?

2009-12-22 Thread neridaj
I was on Dreamhost for a while but once I needed to install 3rd party modules I ran into problems. I've since switched to Slicehost VPS - http://www.slicehost.com/ and would definitely recommend them. If I was going with shared hosting I would probably use Webfaction - http://www.webfaction.com/

Re: stringformat in {% url %}

2009-12-15 Thread neridaj
nevermind, I'm doing this a different way. On Dec 15, 1:46 pm, neridaj <neri...@gmail.com> wrote: > Hello, > > I'm trying to format a variable inside a {% url %} tag with > stringformat but I can't get it right. All I want to do is concatenate > a pound sign (#) to an id i.e

stringformat in {% url %}

2009-12-15 Thread neridaj
Hello, I'm trying to format a variable inside a {% url %} tag with stringformat but I can't get it right. All I want to do is concatenate a pound sign (#) to an id i.e., "#123456789", here is what I have: Thanks for any help, J -- You received this message because you are subscribed to the

ImportError: cannot import name Decimal

2009-12-13 Thread neridaj
File "/usr/lib/python2.6/dist-packages/satchmo_store/shop/ management/ commands/satchmo_check.py", line 4, in from decimal import Decimal File "/usr/lib/python2.6/decimal.py", line 138, in import numbers as _numbers File "/home/neridaj/src/satchmo-trunk

django-tagging - how to retrieve individual tags for specific models without duplicates

2009-12-09 Thread neridaj
Hello, I can't figure out how to retrieve tags for specific models i.e., I would like to show tags for entries if I'm on a blog/entry page, tags for links if I'm on a blog/links page, etc. If I use {{ entry.tags }} in the templates I get duplicate tags and if an entry has more than one tag those

django-syncr - twitter.User.profile_image_url - deprecated attribute?

2009-12-08 Thread neridaj
Hello, I'm just curious if anyone else has run into this problem using the twitter app in django-syncr. I looked on the twitter API docs but didn't find anything. t.syncTwitterUserTweets('twitteruser') Traceback (most recent call last): File "", line 1, in File

Re: page_obj not in template

2009-12-03 Thread neridaj
nevermind, I figured it out. On Dec 3, 4:06 pm, neridaj <neri...@gmail.com> wrote: > Hello, > > I'm trying to display {{ page_obj }} in a template but for some reason > it is empty. Is there something wrong with my code: > > from django.conf.urls.

page_obj not in template

2009-12-03 Thread neridaj
Hello, I'm trying to display {{ page_obj }} in a template but for some reason it is empty. Is there something wrong with my code: from django.conf.urls.defaults import * from django.views.generic.list_detail import object_list, object_detail from coderepos.models import Snippet snippet_info = {

Re: django not finding modules on pythonpath

2009-12-01 Thread neridaj
com> wrote: > On Dec 2, 12:02 pm, neridaj <neri...@gmail.com> wrote: > > > During development I had my project apps in the same directory that > > django-admin.py startproject mysite created. I would now like to have > > my apps in a global directory, django-apps,

Re: django not finding modules on pythonpath

2009-12-01 Thread neridaj
a setup will not mirror > properly how the Django development server works and everything may > not work as expected. > """ > > You have only added the path to the parent directory and not the path > of the directory containing the settings.py file. Your use of rel

Re: django not finding modules on pythonpath

2009-12-01 Thread neridaj
thon-path arg to WDP?  Also, you might do some > sys.path hacking in the .wsgi script. > > neridaj wrote: > > Hello, > > > I'm trying to deploy my project to my server and I don't understand > > why django isn't finding modules I've added to my pythonpath. When I >

django not finding modules on pythonpath

2009-12-01 Thread neridaj
Hello, I'm trying to deploy my project to my server and I don't understand why django isn't finding modules I've added to my pythonpath. When I try to access my site I get 500 errors and after looking at the server log I see a traceback with this: [error] [client 174.xxx.xxx.xxx] ImportError: No

Re: django-tagging module not found

2009-11-30 Thread neridaj
(environ, start_response): environ['wsgi.url_scheme'] = environ.get('HTTP_X_URL_SCHEME', 'http') return _application(environ, start_response) On Nov 30, 9:23 pm, neridaj <neri...@gmail.com> wrote: > Hello, > > I'm trying to deploy my simple app and I've mirro

django-tagging module not found

2009-11-30 Thread neridaj
Hello, I'm trying to deploy my simple app and I've mirrored the project as it was on my local dev machine. For some reason, when I try to browse to the url I get a 500 error and the error log says ImportError: No module named tagging. I've added PYTHONPATH env vars as follows: export

Re: Accessing model instance on pre_save signal

2009-11-25 Thread neridaj
it that I haven't > tried that one out, as luck would have it.  If the main model already > exists, it should work, though. > > Just brainstorming to find a simpler solution.  Have you already tried > it that way? > > Tim > > On Nov 25, 12:08 pm, neridaj <neri...@gm

Re: Accessing model instance on pre_save signal

2009-11-25 Thread neridaj
you create a > screenshot in your view? > > Something about this seems like it is making it more complicated than > it needs to be. but details are lacking t > > -Preston > > On Nov 24, 5:52 pm, neridaj <neri...@gmail.com> wrote: > > > Hello, > > > I'm tr

Accessing model instance on pre_save signal

2009-11-24 Thread neridaj
Hello, I'm trying to change the upload_to attribute of an ImageField so that it is in the format "web_projects/year/slug/". The problem I am having is that the ForeignKey model is getting saved before the related ScreenShot model is able to call it's save method to change upload_to. I'm trying to

Re: url import causing strange errors

2009-11-24 Thread neridaj
I recreated the app manually instead of startapp and it works now, any idea why that is? On Nov 23, 10:16 pm, neridaj <neri...@gmail.com> wrote: > I changed my app name, model names, and url names to the following and > still get the error: > > project/ >     __ini

Re: url import causing strange errors

2009-11-23 Thread neridaj
]+)/$', 'object_detail', web_project_info_dict), ) On Nov 23, 5:32 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Mon, Nov 23, 2009 at 8:21 PM, neridaj <neri...@gmail.com> wrote: > > I don't see the difference between how the urls are setup for my blog > > app and my projects app:

Re: url import causing strange errors

2009-11-23 Thread neridaj
.py admin.py models.py tests.py urls/ __init__.py projects.py On Nov 23, 1:38 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Mon, Nov 23, 2009 at 2:46 PM, neridaj <neri...@gmail.com> wrote: > > I've noticed that sometimes errors in my url co

Re: url import causing strange errors

2009-11-23 Thread neridaj
I keep getting these errors but the module is right where it should be. Exception Type: ImportError Exception Value:No module named models Exception Location: /Users/username/django-projects/mysite.com/mysite/ projects/urls/projects.py in , line 2 On Nov 23, 11:46 am, neridaj

url import causing strange errors

2009-11-23 Thread neridaj
I've noticed that sometimes errors in my url conf will cause strange unrelated errors that have sent me down paths that don't need to be followed because it's a simple typo. I can't seem to find it here but maybe I need another set of eyes on it. (r'^projects/',

Re: passing vars to filters?

2009-11-19 Thread neridaj
Thanks Karen. On Nov 19, 4:56 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Thu, Nov 19, 2009 at 7:25 PM, neridaj <neri...@gmail.com> wrote: > > Is it possible to pass vars to filters rather than hard coding the > > field name, something like this: > > &g

passing vars to filters?

2009-11-19 Thread neridaj
Is it possible to pass vars to filters rather than hard coding the field name, something like this: def search(request): query = request.GET.get('q', '') bits = request.GET.get('models', '').partition('.') model_name = bits[0] field_name = bits[2] model_type =

Re: casting unicode to model

2009-11-19 Thread neridaj
I just found out that get() returns only one object. On Nov 19, 2:30 pm, neridaj <neri...@gmail.com> wrote: > Thanks for the help. Is get_object_for_this_type() not made to handle > multiple objects? If more than one object is returned I get this > error: get() returned more

Re: casting unicode to model

2009-11-19 Thread neridaj
Thanks for the help. Is get_object_for_this_type() not made to handle multiple objects? If more than one object is returned I get this error: get() returned more than one Entry. On Nov 19, 4:10 am, David De La Harpe Golden wrote: > Karen Tracey wrote: > >

Re: casting unicode to model

2009-11-18 Thread neridaj
= model_class.objects.filter(content__icontains=query) return render_to_response('search/search.html', { 'query': query, 'results': results }) On Nov 18, 6:29 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Wed, Nov 18, 2009 at 9:09 PM, neridaj <neri...@gmai

casting unicode to model

2009-11-18 Thread neridaj
Hello, I have a select menu which I would like to use as a model selector in a view but I keep getting 'unicode' object has no attribute 'objects' because I need to cast this to type Model or something similar. How do I go about doing that. Thanks, J -- You received this message because you

problems accessing markdown comments

2009-11-17 Thread neridaj
I can't figure out why my comment vars aren't available in my template. I'm using django.contrib.markup and when I try to preview the comments nothing is displayed, however, the comment var is available in {{ comment|linebreaks }} but not in {{ comment.submit_date|date:"F j, Y" }}, {{

no such column: blog_link.slug

2009-11-15 Thread neridaj
I'm getting this error even though I have added slug field for this model - Link. I ran syncdb a few times and I still get the error. Any suggestions? class Link(models.Model): # Metadata. slug = models.SlugField(unique_for_date='pub_date', help_text="Must be unique for the

Re: django-tagging causing str error

2009-11-15 Thread neridaj
Thanks Karen. On Nov 14, 8:28 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Fri, Nov 13, 2009 at 11:42 PM, neridaj <neri...@gmail.com> wrote: > > I'm using django-tagging and I think it's causing an error when I try > > to access the admin page. If I comment

Re: django-tagging causing str error

2009-11-14 Thread neridaj
wrote: > On Nov 14, 4:42 am, neridaj <neri...@gmail.com> wrote: > > > > > I'm using django-tagging and I think it's causing an error when I try > > to access the admin page. If I comment out the urls that reference > > django-tagging views the error goes away. &

django-tagging causing str error

2009-11-13 Thread neridaj
I'm using django-tagging and I think it's causing an error when I try to access the admin page. If I comment out the urls that reference django-tagging views the error goes away. from django.conf.urls.defaults import * from blog.models import Entry, Link from tagging.models import Tag

Re: admin.site.register() - help

2009-11-12 Thread neridaj
Thanks Matt, that did it. On Nov 11, 11:07 pm, Matt Schinckel <matt.schinc...@gmail.com> wrote: > On Nov 12, 4:18 pm, neridaj <neri...@gmail.com> wrote: > > > since FlatPage is already registered how do I properly register an > > InlineModelAdmin object? > > Yo

Re: admin.site.register() - help

2009-11-11 Thread neridaj
since FlatPage is already registered how do I properly register an InlineModelAdmin object? On Nov 11, 9:51 pm, neridaj <neri...@gmail.com> wrote: > Hey Karen, > > I realized that I shouldn't have been using a generic.StackedInline > and fixed the indentation. I left the FlatPa

Re: admin.site.register() - help

2009-11-11 Thread neridaj
11, 2009 at 10:40 PM, neridaj <neri...@gmail.com> wrote: > > I'm doing something wrong when I try to register models for the admin > > interface and I'm not sure what it is. I have everything in my > > installed apps, is there something wrong with these files? > > &g

Re: admin.site.register() - help

2009-11-11 Thread neridaj
it looks like the admin.AdminModel object is causing the error in this inline definition class PageAdmin(admin.ModelAdmin): inlines = [ KeywordInline, ] admin.site.register(PageAdmin) 'MediaDefiningClass' object is not iterable when I comment that out the blog.Categories class

Re: admin.site.register() - help

2009-11-11 Thread neridaj
I don't get an error, the models just aren't showing up in the admin. On Nov 11, 7:56 pm, Kenneth Gonsalves <law...@au-kbc.org> wrote: > On Thursday 12 Nov 2009 9:10:04 am neridaj wrote: > > > I'm doing something wrong when I try to register models for the admin > > in

admin.site.register() - help

2009-11-11 Thread neridaj
I'm doing something wrong when I try to register models for the admin interface and I'm not sure what it is. I have everything in my installed apps, is there something wrong with these files? INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes',

Re: problems registering models in admin

2009-11-11 Thread neridaj
s import Lawyer > > I don't if this is true in your case as well. > > On Nov 11, 8:19 pm, neridaj <neri...@gmail.com> wrote: > > > I'm working on a standalone app and when I try to add it to the admin > > index it does not show up using: > > > from d

Re: problems registering models in admin

2009-11-11 Thread neridaj
ot;django.contrib.admin" to your INSTALLED_APPS setting. > > -Preston > > On Nov 11, 5:19 pm, neridaj <neri...@gmail.com> wrote: > > > I'm working on a standalone app and when I try to add it to the admin > > index it does not show up using: > > >

problems registering models in admin

2009-11-11 Thread neridaj
I'm working on a standalone app and when I try to add it to the admin index it does not show up using: from django.contrib import admin from blog.models import Category admin.site.register(Category) Thanks, J --~--~-~--~~~---~--~~ You received this message

Using generic relations as an inline - not working

2009-11-11 Thread neridaj
I'm trying to add some model fields to another model for admin editing and can't seem to get it to work i.e., model doesn't show up in admin, inline or otherwise. project/app/admin.py from project.app.models import SearchKeyword from django.contrib.flatpages.models import FlatPage from

Re: tiny_mce TypeError

2009-11-11 Thread neridaj
I figured it out, thanks. On Nov 10, 8:50 pm, neridaj <neri...@gmail.com> wrote: > I'm using 1.2 pre-alpha, I tried pasting that code in, again, but no > dice. > > On Nov 10, 8:06 pm, James Bennett <ubernost...@gmail.com> wrote: > > > On Tue, Nov 10, 2009 at 9:

Re: flatpages not finding site_media

2009-11-11 Thread neridaj
I figured it out, thanks. On Nov 11, 12:00 pm, neridaj <neri...@gmail.com> wrote: > sorry, I'm just trying to use the dev server and added that url: > >     (r'^site_media/(?P.*)$', 'django.views.static.serve', >             {'document_root': '/Users/neridaj/django-te

Re: flatpages not finding site_media

2009-11-11 Thread neridaj
sorry, I'm just trying to use the dev server and added that url: (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/neridaj/django-templates/ neridaj/'}), the url for static_media is being appended to the flatpage i.e., Failed to load source

Re: flatpages not finding site_media

2009-11-11 Thread neridaj
I have a symbolic link named site_media in my project directory. On Nov 11, 12:07 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 11, 7:50 am, neridaj <neri...@gmail.com> wrote: > > > > > > > I'm trying to use some flatpages for static content and I

flatpages not finding site_media

2009-11-10 Thread neridaj
for: http://127.0.0.1:8000/about/css/base.css MEDIA_ROOT = '/Users/neridaj/django-templates/neridaj/' MEDIA_URL = '/site_media/' TEMPLATE_DIRS = ( '/Users/neridaj/django-templates/neridaj/' ) The default template renders but without any of the css. Thanks, J

Re: tiny_mce TypeError

2009-11-10 Thread neridaj
I'm using 1.2 pre-alpha, I tried pasting that code in, again, but no dice. On Nov 10, 8:06 pm, James Bennett <ubernost...@gmail.com> wrote: > On Tue, Nov 10, 2009 at 9:47 PM, neridaj <neri...@gmail.com> wrote: > > I'm just following "Practical Django Projects" and

tiny_mce TypeError

2009-11-10 Thread neridaj
Hello, I'm just following "Practical Django Projects" and was curious if anyone else was able to fix a TypeError when trying to add tiny_mce to the admin for flatpages, or is this something buried in the tiny_mce.js file? (r'^tiny_mce/(?P.*)$', 'django.views.static.serve', { 'dcument_root':

Re: creating symlink for django-admin.py with virtulenv

2009-09-17 Thread neridaj
had to symlink the site-package symlink to django/bin/django-admin.py On Sep 17, 2:29 pm, "neri...@gmail.com" wrote: > I've created my virtual environment but I can't figure out where I can > put a symlink for django-admin.py. I tried my virtualenv/bin/ but that > doesn't

Re: benefits of {% url %} for breadcrumbs?

2009-09-16 Thread neridaj
I guess I can just pass it with the context. On Sep 16, 2:55 pm, neridaj <neri...@gmail.com> wrote: > the only point where DRY comes into play is when you're retrieving > data from the same view, is there a better way to make breadcrumbs? > > On Sep 16, 2:40 pm, Mak

Re: benefits of {% url %} for breadcrumbs?

2009-09-16 Thread neridaj
the only point where DRY comes into play is when you're retrieving data from the same view, is there a better way to make breadcrumbs? On Sep 16, 2:40 pm, Maksymus007 wrote: > On Wed, Sep 16, 2009 at 10:53 PM, neri...@gmail.com wrote: > > > Is there

Re: using Max()

2009-08-14 Thread neridaj
Thanks again Karen. On Aug 13, 7:40 pm, Karen Tracey wrote: > On Thu, Aug 13, 2009 at 5:01 PM, neri...@gmail.com wrote: > > > > > > > Hello, > > > Do I need t convert the value returned from Max() to an int, or am I > > using it incorrectly? I'm getting

Re: overriding save()

2009-08-10 Thread neridaj
Thanks Karen! I've been stumped on this for quite a while and really appreciate your help, you're the best. Cheers, J On Aug 10, 5:16 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Mon, Aug 10, 2009 at 3:07 PM, neridaj <neri...@gmail.com> wrote: > > > when I do thi

Re: overriding save()

2009-08-10 Thread neridaj
user_dir_path zipfile = models.FileField(upload_to=overwrite_upload_to) On Aug 9, 8:35 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Sun, Aug 9, 2009 at 10:23 PM, neridaj <neri...@gmail.com> wrote: > > > It was suggested to me in an earlier post, to override save,

Re: building directory path with user table

2009-08-05 Thread neridaj
(force_insert, force_update) # Call the "real" save() method. def __unicode__(self): return self.name On Jul 22, 10:59 pm, neridaj <neri...@gmail.com> wrote: > I'm new to django and not sure how to do this, is this remotely close? > > class Listing(

Re: building directory path with user table

2009-07-22 Thread neridaj
I'm new to django and not sure how to do this, is this remotely close? class Listing(models.Model): user = models.ForeignKey(User, unique=True) zipfile = models.FileField(upload_to='listings') name = models.CharField(max_length=50) order = models.ForeignKey('Order') def

Re: creating user directories upon account activation

2009-07-13 Thread neridaj
figured it out, it was the = output from the dummy server for the activation code, thanks guys. On Jul 13, 10:03 pm, neridaj <neri...@gmail.com> wrote: > for some reason the function is returning false. This worked fine on > Dreamhost but when I run this using the django server wi

Re: creating user directories upon account activation

2009-07-13 Thread neridaj
> variables at each step. (Pdb is a little cryptic at first, but well > worth the time to learn it.) > Hope that helps, > Alex > > 1http://docs.python.org/library/pdb.html > > On Jul 12, 11:34 pm, neridaj <neri...@gmail.com> wrote: > > > move

Re: creating user directories upon account activation

2009-07-13 Thread neridaj
count activated" when entered but the active checkbox is not checked when I log into the admin and view the user. On Jul 12, 9:39 pm, Kenneth Gonsalves <law...@thenilgiris.com> wrote: > On Monday 13 Jul 2009 10:04:05 am neridaj wrote: > > > moved os import to the t

Re: creating user directories upon account activation

2009-07-12 Thread neridaj
if not profile.activation_key_expired(): media_root = dzopastudio.settings.MEDIA_ROOT user_directory_path = os.path.join(media_root, 'listings', 'neridaj') os.mkdir(user_directory_path) user = profile.user user.is_active = True

Re: creating user directories upon account activation

2009-07-12 Thread neridaj
if not profile.activation_key_expired(): try: import os media_root = dzopastudio.settings.MEDIA_ROOT user_directory_path = os.path.join(media_root, 'listings', 'neridaj') os.mkdir(user_directory_path

Re: creating user directories upon account activation

2009-07-09 Thread neridaj
I tried that and still got no error or directory. if SHA1_RE.search(activation_key): try: profile = self.get(activation_key=activation_key) except self.model.DoesNotExist: return False if not

Re: sending email from local machine

2009-07-08 Thread neridaj
I guess the dummy send_mail works, thanks. On Jul 8, 9:39 pm, Kenneth Gonsalves <law...@thenilgiris.com> wrote: > On Thursday 09 July 2009 10:05:08 neridaj wrote: > > > I saw that link but I would actually like to send the email. > > do you have an smtp serve

  1   2   >