Re: How do django Field type hints work?

2022-09-23 Thread Justin Black
django-models/amp/ > > On Sat, Sep 24, 2022, 5:09 AM Justin Black > wrote: > >> Hello there, >> >> If I have a model: >> >> class Money(models.Model): >> price = models.DecimalField() >> >> m = Money(...) >> pycharm knows that m.pr

How do django Field type hints work?

2022-09-23 Thread Justin Black
Hello there, If I have a model: class Money(models.Model): price = models.DecimalField() m = Money(...) pycharm knows that m.price is of type Decimal but when I read through the django code base, I don't see DecimalField or Field subclassing decimal.Decimal And I don't see any registration

Django Model related_name

2022-09-06 Thread Justin Kpakpa
Hello, pls under what circumstances do you need to defined a related_name of a model field? -- 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+unsubsc

RE: Including URLconf

2022-03-07 Thread Justin Kpakpa
Sent from my GalaxyVisit your settings.py file and include the app in INSTALLED_APPS. Check if that works. Original message From: Alec Greenholdt Date: 07/03/2022 00:24 (GMT+00:00) To: Django users Subject: Including URLconf as described in the documentation i am putting th

Re: SQLite 3.8.3 or later is required (found 3.7.17).

2019-11-05 Thread amul justin
Tq so much bro can u send u r contact number pls im from tamilnadu On Saturday, July 20, 2019 at 6:32:21 PM UTC+5:30, Desh Deepak wrote: > > Sorry for the late reply, > > You can try these commands on your terminal:- > > pip uninstall Django > > Then > > pip install Django 2.0 > > and try to run

Re: Server-Sent Events for Django

2018-06-13 Thread Justin Karneges
it. If anyone really needs to support old IE they should know to include it themselves. Justin On Wed, Jun 13, 2018 at 7:45 PM, Jason wrote: > ooh, nice! missed that part. > > Did you consider having that pull from a CDN rather than locally? Reason > being, any updates to said poly

Re: Server-Sent Events for Django

2018-06-13 Thread Justin Karneges
ld suggest you update your readme to reflect that SSE is not > supported by any MS browser (IE or Edge) as shown by > https://caniuse.com/#feat=eventsource. > > > On Wednesday, June 13, 2018 at 7:34:21 PM UTC-4, Justin Karneges wrote: >> >> Hi folks, >> >> I'

Server-Sent Events for Django

2018-06-13 Thread Justin Karneges
y and call send_event() from anywhere. I hope others find it useful. Justin -- 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...@

Redirect Loops and 404 with Django Channels and runserver command

2018-06-08 Thread Justin Lee
I was just trying to integrate channels into an existing django/DRF project and I have been running into an issue where my original urls paths are breaking when I do runserver. My root index view leads to 301 infinite redirects loop and my other app views results in a 404. The Socket server i

Borrowing functionality from Django Admin forms

2018-03-07 Thread Justin Johnson
I have a user who saw how new objects can be created using the Admin forms, and asked if I could reproduce some of that functionality. I'm still new to Django, and even newer to building forms. I'm wondering if there is a way to "borrow" elements from the Admin forms into my own forms and tem

GeoDjango GDAL Slice Error in layer.py

2018-01-12 Thread Justin Johnson
I'm completely new to GeoDjango. I'm working through the tutorial for Django version 2.0, and I am encountering an error when I follow the steps in the GeoDjango section. Specifically, when I attempt to slice a Layer object to extract Features, it gives me an error which looks like a poss

Django tutorial - Misleading instructions

2017-06-29 Thread Justin Stubbs
'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] After reading https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/ Hoping to get this clarified as for a beginner this would be quite comp

Re: Form Inheritance. Order is Reversed.

2017-01-11 Thread Justin J
For anyone interested, In django/django/forms/forms.py ln 45: # Walk through the MRO. declared_fields = OrderedDict() for base in reversed(new_class.__mro__): # Collect fields from base class. if hasattr(base, 'declared_fields'): declared_fields.update(base.declared_fields) "r

Re: Form Inheritance. Order is Reversed.

2017-01-10 Thread Justin J
was not present, so I suspect the upgrade changed some related behavior. Maybe it was that change in ver. 1.7 as you suggested. On Monday, January 9, 2017 at 9:19:34 AM UTC-8, Justin J wrote: > > I have a form which is sublassing 3 forms, and has no new fields. > > class D(A,

Form Inheritance. Order is Reversed.

2017-01-09 Thread Justin J
I have a form which is sublassing 3 forms, and has no new fields. class D(A, B, C): pass form class B is subclassing 2 forms. class B(B1, B2): pass In the template I am looping through the form. {% for d in forms.myforms %} {% for field in d.form.visible_fields %} {% en

Re: Access request body in the django.request logger

2016-11-07 Thread Justin Wilson
Sorry, I had those reversed. It works find WITH uWSGI, and fails with the Django dev server. On Monday, November 7, 2016 at 2:48:14 PM UTC-7, Justin Wilson wrote: > > Stumbled across this post while trying to solve the same issue > *(we've had this issue since 1.10 release, but

Re: Access request body in the django.request logger

2016-11-07 Thread Justin Wilson
Stumbled across this post while trying to solve the same issue *(we've had this issue since 1.10 release, but have kept with 1.9 due to this issue).*We're only getting this with Django 1.10+ when running behind uWSGI. The issue goes away if we just run the Django dev server. On Thursday, Septem

Re: runserver request body limitations

2015-07-01 Thread Justin Karneges
for a chunked upload). On Wed, Jul 1, 2015 at 4:17 PM, Justin Karneges wrote: > It appears that once a certain size is exceeded, the request body is not > received at all or truncated to 0. > > Here's a minimal view that echos the request body: > > def echo(request): &

Re: runserver request body limitations

2015-07-01 Thread Justin Karneges
e, be more specific > > On Wed, Jul 1, 2015, 11:06 PM Justin Karneges wrote: > >> Hi folks, >> >> I'm running into trouble doing a PUT with chunked encoded request body >> when the size exceeds around 35K. This is with runserver, so there's no >> A

runserver request body limitations

2015-07-01 Thread Justin Karneges
ether this issue is on the sender side or Django side. Thanks, Justin -- 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...@googlegr

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
of Mezzanine's migration is the simplest solution. I sense that I'm going to face some resistance if I suggest changing their docs to reflect this. I'll start with a blog post. On 11/04/2014 04:30 PM, Justin Myles Holmes wrote: > Well, as I say, I don't particularly like

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
you have anything resembling magically changing models in your > project, you're not going to be able to use anything makemigrations > outputs and expect it to Just Work™. > > Andrew > > On Tuesday, November 4, 2014 3:59:23 PM UTC-8, Carl Meyer wrote: > > Hi Jus

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
subclass for this purpose and document how to import and use it in a migration? Well, the problem there is that Operation isn't used directly, but subclassed for each individual type of migration operation. On 11/04/2014 03:33 PM, Carl Meyer wrote: > Hi Justin, > > On 11/04/

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
subclass for this purpose and document how to import and use it in a migration? On 11/04/2014 03:33 PM, Carl Meyer wrote: > Hi Justin, > > On 11/04/2014 04:17 PM, Justin Myles Holmes wrote: >> Hey Carl. Missed you so very much at DjangoCon. :-) > Thanks :-) > >

Re: A migration in one app that adds a field to another

2014-11-04 Thread Justin Myles Holmes
Hey Carl. Missed you so very much at DjangoCon. :-) > I'm not sure why the mezzanine docs don't mention using the SOUTH_MIGRATION_MODULES setting (or Django 1.7 equivalent MIGRATION_MODULES) to override the location of the mezzanine app's migrations to a package in your project, where you can fr

making an http request internally

2014-10-17 Thread justin
roper. Any tips here would be great. Thanks! Justin -- 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

Re: ORM Question

2014-04-02 Thread Justin Holmes
to the picture somehow? On Wed, Apr 2, 2014 at 12:35 PM, Bill Freeman wrote: > My point was that annotate might work after the other problems were > fixed. Have you re-tested since? If your annotate still doesn't work then > perhaps someone with more annotate experience than I wi

Re: ORM Question

2014-04-02 Thread Justin Holmes
is fixed, your original > annotate might work. > > > On Tue, Apr 1, 2014 at 6:20 PM, Justin Holmes wrote: > >> You say "use the reverse relation manager in LlamaHerd to build up your >> annotation," but that answer the question. >> >> How can I sort LlamaH

Re: ORM Question

2014-04-01 Thread Justin Holmes
You say "use the reverse relation manager in LlamaHerd to build up your annotation," but that answer the question. How can I sort LlamaHerd objects by the DOB of their largest llama? On Tue, Apr 1, 2014 at 6:13 PM, Justin Holmes wrote: > Yes, absolutely - my bad. I have updated t

Re: ORM Question

2014-04-01 Thread Justin Holmes
Tue, Apr 1, 2014 at 6:09 PM, Bill Freeman wrote: > Aren't you missing a ForeignKey relationship to tell which LlamaHerd a > Llama belongs to? > > Then you would use the reverse relation manager in LlamaHerd to build up > your annotation. > > > On Tue, Apr 1, 2014 at 5:

ORM Question

2014-04-01 Thread Justin Holmes
might be able to use annotate: LlamaHerd.annotate(largest_llama=Max('llama__size')).order_by('largest_llama__dob') ...but the annotate here creates fields with float values, not with the model instances. -- Justin Holmes Chief Chocobo Breeder, slashRoot slashRoot: Coffee Hou

Re: Django 1.6 test cases for code which calls transaction.set_autocommit()

2014-03-07 Thread Justin Michalicek
On Friday, March 7, 2014 2:58:29 AM UTC-5, Anssi Kääriäinen wrote: > > On Friday, March 7, 2014 12:11:59 AM UTC+2, Justin Michalicek wrote: >> >> It appears that due to test cases running in an atomic block, testing >> methods which use transaction.set_autocommit() all

Django 1.6 test cases for code which calls transaction.set_autocommit()

2014-03-06 Thread Justin Michalicek
It appears that due to test cases running in an atomic block, testing methods which use transaction.set_autocommit() all fail. I've got a small handful of test cases around methods which need to use manual transaction management and they are definitely working when I actually use the site, but

Why no locale (formats.py) for Australia en_AU or Canada en_CA?

2013-08-30 Thread Justin Hill
, but just seems odd that this would be necessary for such well known countries. Am I doing it wrong? Justin -- 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 a

Re: Conneting Sybase ASE using pyodbc in Django

2013-08-06 Thread Justin Thorsen
ybase ase even if it compromises its previous compatibility with anything that isnt sybase ase. - Justin On Wednesday, September 8, 2010 9:12:49 PM UTC-5, Ivan wrote: > > I wonder any one is conneting Sybase ASE using pyodbc in Django? Any > wrapper available for that? Any solution? >

Re: Uploading file and serving them with CDN - Best practices

2013-08-06 Thread Justin Michalicek
It's pretty straightforward to get django to automatically upload everything to s3 using https://github.com/qnub/django-boto/ I've only used it to server directly from s3, but it sounds like you might want to upload to s3 and then serve from cloudfront. cloudfront uses edge servers to serve con

Re: Django installation on vanilla Mac OSX 10.8.2 mountain lion

2013-08-02 Thread Justin Michalicek
I install it on my Mac running 10.8.4 using pip on a pretty regular basis for starting new projects and testing things. I use postgres from homebrew, virtualenv and virtualenvwrapper installed as system packages, then install django as needed into virtualenvs using pip. On Friday, August 2, 20

Re: django workaround for multiple primary keys or sqlalchemy

2013-07-29 Thread Justin Michalicek
I would go with the Django ORM and just add a unique_together for a multiple column uniqueness constraint. That index won't be your primary key, but it will still be a unique index. I've even gone as far as to use custom .sql files (which manage.py syncdb runs) and custom sql in South migrati

Re: Django count

2013-07-28 Thread Justin Michalicek
It looks like maybe a slight change to your models and schema would make this a bit cleaner if I'm understanding your overall schema correctly. I would split this up into two different models with a ManyToMany relationship in there. I am assuming you have students and then an Egitim instance

Re: Http404 and process_exception

2012-03-30 Thread Justin Holmes
necessary at all, as the Http404 page makes it clear that it's an exception. On Wed, Mar 28, 2012 at 7:22 PM, Russell Keith-Magee wrote: > > > On 29/03/2012, at 12:10 AM, Justin Holmes wrote: > > > Russell, > > > > Thanks for the reply. > > > > T

Re: Http404 and process_exception

2012-03-28 Thread Justin Holmes
ink though that I simply hadn't raised Http404 since implementing this middleware. It makes perfect sense that it behaves the way it does. On Tue, Mar 27, 2012 at 11:29 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On 28/03/2012, at 6:31 AM, Justin Holmes wro

Http404 and process_exception

2012-03-27 Thread Justin Holmes
Heretofore, I had always believed that Http404 did not cause Middleware process_exception() to be run. Am I right in this thinking? I have a get_object_or_404 that, when the object in question isn't found, is running process_exception. -- Justin Holmes Head Instructor, SlashRoot Colle

Re: New way to run your Django projects

2012-03-18 Thread Justin Holmes
; To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to django-users+unsubscribe@** > googlegroups.com . > For more options, visit this group at http://groups.google.com/** > group/django-users?hl=en<http://groups.googl

Re: question about "\d" in url pattern

2012-02-27 Thread Justin Myers
On Feb 27, 1:44 am, Masklinn wrote: > On 27 févr. 2012, at 07:23, Zheng Li wrote: > > i thought "\d+" in url promises i can get an int point in cheer_confirm, > > and am i wrong? > > \d+ ensures you will only get naturals, but django will not perform any > conversion automatically. Especially n

django-deeper

2011-12-28 Thread Justin Holmes
elcome growth in this direction. http://groups.google.com/group/django-deeper -- Justin Holmes Head Instructor, SlashRoot Collective SlashRoot: Coffee House and Tech Dojo 60 Main Street New Paltz, NY 12561 845.633.8330 -- You received this message because you are subscribed to the Google Groups "Djang

Re: django.conf.urls.defaults.url documentation

2011-11-15 Thread Justin Myers
Docs are here: https://docs.djangoproject.com/en/1.3/topics/http/urls/#url -Justin On Nov 14, 11:59 pm, Mike Thon wrote: > I recently started working on a new Django project using the latest > release, and I found the function django.conf.urls.defaults.url being used > in urls.py.  T

Re: point url with folder to s3

2011-11-13 Thread Justin Steward
really should anyway. You should probably be using a variable in your code for media location in the future, so you only have to change /media once. Isn't there a variable in the settings explicitly for the url of static media? ~Justin -- You received this message because you are subscribed

contrib.auth tests - not respecting TEMPLATE_DIRS?

2011-10-10 Thread Justin Holmes
s) specified in the TEMPLATE_DIRS setting. The same code is executed just fine in production. -- Justin Holmes Head Instructor, SlashRoot Collective SlashRoot: Coffee House and Tech Dojo 60 Main Street New Paltz, NY 12561 845.633.8330 -- You received this message because you are subscribe

test_invalid_key failing

2011-10-04 Thread Justin Holmes
I am having a problem with contrib.sessions.tests.test_valid_key (line 159). It's a mixin which in the failure case is mixed with CacheDBSessionTests. The test raises: "AttributeError: 'bool' object has no attribute 'get'" The error is actually raised by session.save() on 164. Stepping inward

Re: is photologue still maintained?

2011-09-17 Thread Justin
sed on ImageKit. You can check that out here: https://bitbucket.org/jdriscoll/django-photolog I would love for someone who uses PL to take over the project but so far I haven't found anyone suitable. -- Justin On Sep 16, 2:00 am, graeme wrote: > It may or may not help you, but

Abstract base classes, multiple inheritance and field removal

2011-05-26 Thread Justin
t a good way to remove fields, is there another? thanks, Justin -- 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

django custom template tags: how to send to (parser, token)

2011-03-30 Thread justin jools
I've just started using custom tags and need some help parsing info to: @register.tag def friends_of(parser, token): tag_name, user_var = token.split_contents() return FriendsOfNode(user_var) class FriendsOfNode(template.Node): def __init__(self, user_var): self.user_var = tem

Django Notification - can't send notifications

2011-03-28 Thread justin jools
can't send notifications have tried adding (in notification models.py): if notification: notification.send([self.from_user], "friends_accept", {"invitation": self, "new_user": self.to_user}) but does nothing although I can enter notices manually in admin. -- You received this message be

django-simple-friends + notifications: how to intergrate?

2011-03-28 Thread justin jools
I have both simple-friends and notifications running and workign and have set up notice types. How do I use signals from friend request for instance to trigger notice types? examples simple-friends: class FriendshipRequest(models.Model): from_user = models.ForeignKey(User, related_name="inv

Re: simple friends template help

2011-03-28 Thread justin jools
create_' \ 'userblocks_instance') On Mar 28, 6:57 pm, Joel Goldstick wrote: > On Mon, Mar 28, 2011 at 12:14 PM, mike171562 > wrote: > > > > > Maybe you could use the ifequal tag in your template, not sure what >

Re: simple friends template help

2011-03-28 Thread justin jools
I now have a different overriding problem with this simple-friends app: url patterns are simple: urlpatterns = patterns('friends.views', url(r'^$', 'friend_list', name='friends_home'), url(r'^list/(?P\w+)/$', 'friend_list', name='friend_list'), url(r'^a

django-simple-friends template help

2011-03-27 Thread justin jools
need some help setting up templates for friends list: how do I iterate a list of invited friends and are friends? I have tried: {% for friends in Friendship.objects.are_friends %} target_user: {{ friends.target_user}} current_user:{{ friends.current_user}} are_frien

simple friends template help

2011-03-27 Thread justin jools
need some help setting up templates for friends list: how do I iterate a list of invited friends and are friends? I have tried: {% for friends in Friendship.objects.are_friends %} target_user: {{ friends.target_user}} current_user:{{ friends.current_user}} are_frien

Re: max recursion depth exceeded

2011-01-13 Thread Justin Murphy
Hi vamsy, Can you post your urls.py files? Perhaps you have a recursive inclusion. Example: myapp.urls.py patterns = urlpatterns('', url(r'^/', include('myapp.urls') # this will result in a recursive inclusion. ) -Justin -- You received this message bec

Re: empty DateTimeField?

2011-01-13 Thread Justin Murphy
Good to hear! Thats a common problem; you need to remember that your models might not reflect the constraints of the database once you make changes. Take a look at South for database migrations. It's not too hard to use once you get used to the workflow. http://south.aeracode.org/ -J

Re: Meaning for this error

2011-01-13 Thread Justin Murphy
ython interpretor that automatically loads your project settings, installed apps, and other Django infrastructure. Also, make sure that Django installed on your pythonpath. -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Class based views and form processing

2011-01-12 Thread Justin Murphy
Thanks, Skylar. You're right, it worked. Now I am just shaking my head and saying "next time, I'll just read the source..." -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Class based views and form processing

2011-01-12 Thread Justin Murphy
Hi, I still haven't found an answer to this problem so I am shamelessly bumping the last updated date. Thanks in advance for your help! -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: empty DateTimeField?

2011-01-11 Thread Justin Murphy
Did you create a new DB and run syncdb or is it the same DB based on the old schema? -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: empty DateTimeField?

2011-01-11 Thread Justin Murphy
Yes. A quick read of the Model Field Reference docs would have answered this. my_date = models.DateTimeField(blank=True, null=True). http://docs.djangoproject.com/en/dev/ref/models/fields/ -Justin -- You received this message because you are subscribed to the Google Groups "Django

Re: Class based views and form processing

2011-01-10 Thread Justin Murphy
django-developers and/or IRC. [1] http://docs.djangoproject.com/en/dev/ref/class-based-views/#django.views.generic.edit.ModelFormMixin.form_valid Thanks, Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Curious 500 errors

2011-01-10 Thread Justin Murphy
your part for security issues. Example: from django.views.decorators.csrf import csrf_exempt @csrf_exempt def handle_mailchimp_callback(request): ... Here is a link to the Django CSRF documentation: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/?from=olddocs#exceptions -Justin --

Class based views and form processing

2011-01-09 Thread Justin
field has editable=False so the form doesn't include it in the fields list. Am I missing something simple? Probably :). Any help would be greatly appreciated! Thanks, -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: OpenToken Spec & Single Sign On

2011-01-07 Thread Justin
Well that doesn't seem like much fun! But you're right, that's what will eventually happen. -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: OpenToken Spec & Single Sign On

2011-01-07 Thread Justin
f good tests so I know when I am on the right track. I hope to open source the code once I am done. Thanks, Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

OpenToken Spec & Single Sign On

2011-01-06 Thread Justin Murphy
11703 OpenToken Perl module on GitHub: https://github.com/bleargh45/crypt-opentoken/ I appreciate your help! Thanks, Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Re: Any Django framework command to freeze/wait/notify ?

2011-01-05 Thread Justin
+1 for Celery. For Django integration, see django-celery: https://github.com/ask/django-celery -Justin On Jan 5, 2:21 am, vivek_12315 wrote: > Hi all, > > This is a common scenario which many of you have faced. > > Say, I created a simple view file, in which user uploads a file

Re: Multi-tenant Django w/ Multi-DB?

2011-01-05 Thread Justin
this hairy problem, please post it. I'd be interested to see what you come up with. -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: Django-Facebook (yet another thread)

2010-12-15 Thread Justin Murphy
Facebook published a sample GAE application. The code is pretty straightforward and you can pretty much use the same concepts in your Django code. I would think that the signed request logic would work best in middleware. https://github.com/facebook/runwithfriends -Justin -- You received this

django-registration vs django-account + django-url | opinions?

2010-09-23 Thread justin jools
I have tried out django-registration and liked the simplicity of it, but following the pinax project, (and using their apps to instruct my own build) I see they use: django-account which also requires django-url I have started just started playing with it and was wondering if anyone has any opin

InterfaceError at /admin/ Error binding parameter 1 - probably unsupported type.

2010-09-23 Thread justin jools
Have searched everywhere for solution to this error (below) when loggin in to admin I also get this error during form post rediect, thinking it it something to do with intalled apps/middleware or post setting maybe but dont know what. Anyone come across this? Many Thanks InterfaceError at /admin

help setting 'apps' folder... path issue

2010-09-22 Thread justin jools
I am trying to run my apps from 'apps' folder and have 'apps.registration' installed apps/settings.py but the admin.py is having some problem with the path and I get error in admin: ImportError at /admin No module named registration.models Request Method: GET Request URL: http://devhead.alwaysd

Re: help setting 'apps' folder Error: No module named registration

2010-09-22 Thread justin jools
add to settings.py: import os import sys PROJECT_ROOT = os.path.dirname(__file__) sys.path.insert(0, os.path.join(PROJECT_ROOT, "apps")) full article: http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/ On Sep 21, 10:14 pm, justin jools

help setting 'apps' folder Error: No module named registration

2010-09-21 Thread justin jools
I have setup 'apps' folder with __init__.py inside and 'registration' app inside 'apps' I then refer to it with: 'apps.registration' in installed_apps/settings.py When I run syncdb it gives error: Error: No module named registration -- You received this message because you are subscribed to th

Re: how to replace "Congratulations on your first Django-powered page." with my home page

2010-09-16 Thread Justin Myers
It already tells you why it's showing that page. You need to add some entries to urls.py, at the very least. The tutorial Sithembewena linked you to is a good start. -Justin On Sep 16, 12:25 am, perfecthills wrote: > Have a website build on django, i desire to transfer the website to

Template library account_tags not found | 'account_tags' is not a valid tag library

2010-09-12 Thread justin jools
getting this error trying to load templatetag in my account_tags template: {% load account_tags %} get this error: (detail at btootm) Template library account_tags not found | 'account_tags' is not a valid tag library tried at bash: from django.contrib.admin.templatetags import account_tags g

Re: Integrating User Profile with Auth

2010-09-12 Thread Justin Myers
kwargs and 'instance' in kwargs: if kwargs['created']: profile = UserProfile(user=kwargs['instance']) profile.save() post_save.connect(create_profile, sender=User) HTH, Justin On Sep 11, 8:45 pm, darren wrote: > I think that my m

have gdata-2.0.11 installed | cant find gdata.contacts.service | error: no attribute 'GDATA_NAMESPACE'

2010-09-12 Thread justin jools
I am installing django-friends and am getting error from importer.py: (full file at: http://github.com/jtauber/django-friends/blob/master/friends/importer.py) cannot not import this, yet I have gdata-2.0.11 on my python path, with contacts.service inside import gdata.contacts.service is causing

Re: django-simple-freinds: template tags and Friendship request

2010-09-10 Thread justin jools
Hi Preston thanks for your response but still having problem with this: views.py (full list below) passes: extra_context['friendship_requests'] = {'incoming': incoming_requests, 'outgoing': outgoing_requests} I have tried looping through this to ex

django-simple-friends help

2010-09-10 Thread justin jools
Hi, I am using django-simple-friends app and was hoping you would give me some guidance. http://github.com/muhuk/django-simple-friends I have set up friends_list.html no problem: Friend List Friends for {{ user }} {% for friends in friends_list %} {{ friends.username }} {% endfor %}

django simple friends help

2010-09-10 Thread justin jools
Hi Muhuk, I am using django-simple-friends app and I was hoping someone would give me some guidance. http://github.com/muhuk/django-simple-friends I have set up friends_list.html no problem: Friend List Friends for {{ user }} {% for friends in friends_list %} {{ friends.username }} {% e

django-simple-freinds: template tags and Friendship request

2010-09-09 Thread justin jools
Hi Muhuk, I am using django-simple-friends app, much easier to setup than django- friends. but need a little help and was hoping for some guidance. I have set up friends_list.html no problem: Friend List Friends for {{ user }} {% for friends in friends_list %} {{ friends.username }} {%

Anyone used django-simple-friends?

2010-09-08 Thread justin jools
Have setup django-simple-friends, adn can pass url to add/block/delete friends easily: http://127.0.0.1:8000/friends/add/jim/ http://127.0.0.1:8000/friends/block/jim/ http://127.0.0.1:8000/friends/list/admin/ I have the friend list template setup but don't know what variables to pick up from vi

Django-friends help

2010-09-07 Thread justin jools
Canyone with experience of django-friends give some setup guidelines. I have read the docs but can't follow it easily, they are a bit sparse for myself as beg-internediate level user. I have installed: dajngo apps: registration, profiles, accounts, messages, notifications and friends. I'm having

Re: django-friends | setup views.py with templates

2010-09-06 Thread justin jools
Hi I have setup jtauber notification and friends apps but now I am stuck as to how to add views/urls to produce add friends/friends accept/friends list etc. please help me through the process thx On 6 Sep, 18:24, justin jools wrote: > trying to setup simple social network > have ins

django-friends | setup views.py with templates

2010-09-06 Thread justin jools
trying to setup simple social network have installed: registration, profiles, accoutns, messages but am stuck as how to setup/link the views.py to templates/ notification. I guess this is what is needed to be done. Any help much appreciated -- You received this message because you are subscribe

Re: Django template : For Loop

2010-09-05 Thread Justin Myers
What error message is it giving you? I'd assume it's a problem with the objects you're passing it, since zip is a built-in Python function: http://docs.python.org/library/functions.html#zip On Sep 5, 11:29 am, Jagdeep Singh Malhi wrote: > > If these objects are lists, say list1 and list2, in yo

Re: django model filter

2010-09-03 Thread Justin
Well, I'm glad it works. Please post, if you want to, a cleaner solution if you find it! -Justin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe

Re: django model filter

2010-09-03 Thread Justin
ances greater than jeff's absolute balance and all negative balances less than jeff's absolute balance. This avoids adding a field to your model like 'balance_abs', which would be just a calculation anyways. I don't know if this is the cleanest way to do it, but let m

Re: fetching values from model

2010-09-02 Thread Justin Myers
logic. It's _only_ designed for presentation. For the most part, if you want to call a function, call it in the view. -Justin On Sep 1, 11:02 pm, Pradnya wrote: > Hey thanks, > Is there anyway I can call a function in HTML template? > > On Sep 1, 6:23 pm, Steve Holden wrote: >

Re: fetching values from model

2010-09-01 Thread Justin Myers
://docs.djangoproject.com/en/1.2/howto/custom-template-tags/ -Justin On Sep 1, 8:12 am, Pradnya wrote: > ok. Is there anyway I can load model inside HTML template? or > basically what is {% load  %} is used for ? > > On Sep 1, 6:02 pm, Jonas Geiregat wrote: > > > You don

Re: Django GeoIP

2010-07-18 Thread Justin Myers
s All, > > Its now clear to me. For sharing purpose, maybe I'll go for pygeoip? > Since I really only need the GeoIP only. Much simpler, though could be > much slower? > > On Jul 18, 12:20 am, Justin Myers wrote: > > > Yes, there are dependencies for Geo

Re: Django GeoIP

2010-07-17 Thread Justin Myers
so useful. HTH, Justin On Jul 17, 12:58 am, haibin wrote: > hi, > > I am trying to use GeoIP part of GeoDjango. I importing it by from > django.contrib.gis.utils import GeoIP but getting import error. Do I > have to install someting or do the whole installation process for >

Re: How can view tweak response object to go to a specific *anchor* on the template?

2010-07-17 Thread Justin Myers
When is that code running? If it's in the head element and not checking whether the document's finished yet, it might be executing before the anchor you're targeting is ready. Consider either using this, for something using jQuery: $(document).ready(function() { window.location = window.locati

Re: Best way to get data into a HTML table?

2010-07-17 Thread Justin Myers
ld in fields: ... print '%s: %s' % (field.name, photo.__getattribute__(field.name)) and get a list of all of photo's field names and values. I'm not sure how best to do this in a template yet, but it shouldn't be that hard to figure out. HTH, Justin On Jul 17, 4:11 am,

  1   2   3   4   >