RE: E-comm live project

2024-03-19 Thread Roy Matheri
I’m interested please add me my WhatsApp number is +254759355344 Sent from Mail for Windows From: 1001_prabhjot SinghSent: Monday, March 18, 2024 8:26 PMTo: Django usersSubject: E-comm live project so i am working on a full stack e-comm website and this project is really very big for me because it'

RE: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-21 Thread Roy Matheri
Hi, I would be interested to join this wonderful project Sent from Mail for Windows From: Tendai HamunakwadiSent: Wednesday, February 21, 2024 10:42 PMTo: Django usersSubject: Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project! Hi Guys Yes I'm very much interested to be a par

RE: Redesign of agricultural project with python django and next.js technologies.

2024-02-18 Thread Roy Matheri
Alright Jorge Bueno I offered to work on the front end using Next JS my GitHub username is Royweru  Sent from Mail for Windows From: Jorge BuenoSent: Sunday, February 18, 2024 7:48 PMTo: Django usersSubject: Redesign of agricultural project with python django and next.js technologies. The project:I

RE: Looking for collaborators for an online marketplace project with Python, Django, React.js and Next.js

2024-02-12 Thread Roy Matheri
Hey I’m interested add me thank you +254759355344 Sent from Mail for Windows From: kelvin AceSent: Monday, February 12, 2024 5:16 PMTo: django-users@googlegroups.comSubject: Re: Looking for collaborators for an online marketplace project with Python, Django, React.js and Next.js +2349053116324 On M

Django Developers Survey 2023

2023-09-26 Thread Roy Lagg
The DSF is once again partnering with JetBrains to run the *2023 Django Developers Survey [ 10 mins ]* After the survey is over, we will *publish the aggregated results* and randomly choose 10 winners (from those who complete the survey in its entirety

Re: How is Django For Api book

2023-08-15 Thread Roy Lagg
You could check out *William S. Vincent - REST APIs with Django. *The book is easy to read and has industry-standard tips and guides. On Tuesday, August 15, 2023 at 1:59:53 AM UTC+3 abu yahya Diab wrote: > I have good knowledge in API, you can say beginner knowledge in API. > I'm trying to delve

Re: associate Developers for Google

2023-06-18 Thread Prince Roy
I'm interested. Here's my resume. On Sat, 17 Jun, 2023, 20:13 Peter Benjamin Ani, wrote: > > Yes please, how can I hit you hit for the application please > On Sat, 17 Jun 2023 at 15:11, Ashish Rawat > wrote: > >> Yes i am looking >> >> On Sat, Jun 17, 2023, 7:39 PM Lucifer Black >> wrote: >> >

Re: ModuleNotFoundError: No module named 'tutorial.quickstart'

2022-09-03 Thread Swetank Subham Roy
It should be: import .views Or from .views import your_view It should be a relative import On Sat, 3 Sep 2022 at 7:16 PM, Lakshyaraj Dash wrote: > She has views inside tutorials then quickstart. She has named every folder > as tutorial. She needs to rename some folders > > On Sat, 3 Sep, 2022,

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
ednesday, February 10, 2021 at 9:32:31 PM UTC-5 Roy Smith wrote: > I've gotten back to playing with this. What I've ended up doing is > monkey-patching render to send the signal django.test.Client is expecting > from the template backend. Paraphrasing my (python 3.7)

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
bruary 4, 2021 at 7:29:23 PM UTC-5 Roy Smith wrote: > I started my current project using native django templates and now I'm > converting to jinja2. For the most part, it has gone smoothly. > > The surprising roadblock was that this broke all my unit tests. The issue > i

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
AM UTC-5 Benny M wrote: > Hi Roy, > > I haven’t been through this personally, but it strikes me as odd that the > test can’t read the request context. On the surface it would stand to > reason that if the test can’t read it, then the page wouldn’t render on > browser request.

test client vs jinja?

2021-02-04 Thread Roy Smith
I started my current project using native django templates and now I'm converting to jinja2. For the most part, it has gone smoothly. The surprising roadblock was that this broke all my unit tests. The issue is that django.template.backends.jinja2.Jinja2 doesn't populate response.context.

Getting staticfiles to find subdirectories?

2021-01-14 Thread Roy Smith
I'm running django 2.2. My static directory has a subdirectory which I want to deploy, but as far as I can tell, staticfiles only finds files in the top-level static directory. is there any way to make it recurse and find everything below the static directory, and keep the same directory struc

Re: forms.ChoiceField calls choices callback twice?

2020-08-27 Thread Roy Smith
Hmmm, maybe related to https://code.djangoproject.com/ticket/26665 ? On Thursday, August 27, 2020 at 5:29:39 PM UTC-4 Roy Smith wrote: > I'm running: > > Python 3.7 > Django 2.2 > Debian 4.9 > > If I configure a forms ChoiceField with a callback function for choices, &

forms.ChoiceField calls choices callback twice?

2020-08-27 Thread Roy Smith
I'm running: Python 3.7 Django 2.2 Debian 4.9 If I configure a forms ChoiceField with a callback function for choices, it gets called twice each time I render the form: > from unittest import TestCase > from django import forms > > def callback(): > print("callback") > return [('foo',

Re: social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-05 Thread Roy Smith
I got this figured out. It turns out I had a dependency on social_auth in an entirely different part of my code where I execute reqeust.user.social_auth.get(provider='mediawiki').extra_data['access_token'] regardless of what auth backend was actually used. > On Aug 4,

social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-04 Thread Roy Smith
I have both model and social backends configured in settings.py: > AUTHENTICATION_BACKENDS = ( > 'django.contrib.auth.backends.ModelBackend', > 'social_core.backends.mediawiki.MediaWiki', > ) When I run this test: > from django.test import TestCase, Client > from django.contrib.auth.mod

Re: How to configure a DatagramHandler for logging?

2020-06-28 Thread Roy Smith
Oh, never mind. It turns out 'logging.handlers.DatagramHandler' is exactly what you need, I just didn't get all the pieces wired up right. > On Jun 28, 2020, at 9:20 PM, Roy Smith wrote: > > 'logging.handlers.DatagramHandler', -- You received this mes

Re: How to configure a DatagramHandler for logging?

2020-06-28 Thread Roy Smith
Correction, the line that says 'logging.handlers.DatagramHandler', really reads 'logging.DatagramHandler' in the code I'm running. The logging.handlers.DatagramHandler was just something I tried to see what it would do. > On Jun 28, 2020, at 9:17 PM, Roy Smi

How to configure a DatagramHandler for logging?

2020-06-28 Thread Roy Smith
Python 3.7.3 Django 2.2.13 Debian Linux I'm trying to configure a DatagramHandler for logging. My LOGGING config is: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'file': { 'level': 'DEBUG', 'cla

Re: logged in and got logout immediately upon reload the page

2020-02-26 Thread Roy Huang
user model at first migration only. > > Hope this helps, you can ask here for your queries. > Cheers, > Naveen Arora > > On Wednesday, 26 February 2020 20:11:27 UTC+5:30, Roy Huang wrote: >> >> thanks Naveen >> >> wow, how did you even guess that !! yes I did

Re: logged in and got logout immediately upon reload the page

2020-02-26 Thread Roy Huang
thanks Naveen wow, how did you even guess that !! yes I did have my own authentication model on top of the original one I will put up more detail first thing tomorrow at work, so glad somebody can help me out (crying ~~) Roy Naveen Arora於 2020年2月26日星期三 UTC+8下午9時46分32秒寫道: > >

logged in and got logout immediately upon reload the page

2020-02-26 Thread Roy Huang
Hi all, any help will be appreciated, i've bee stuck on this for days, couldnt find answers ok, here it is, 1) logged in and retrieved data back to a page, all good (got sessionid and csrftoken) 2) make a request on a view which has got @login_required, then got redirect to login (apparently

Re: unable to execute 'workon' command

2019-12-12 Thread rishabh roy
I am student trying to do the project..could anyone suggest anything.. On Wed, Dec 11, 2019 at 5:53 PM rishabh roy wrote: > I am unable get into a virtualenv in vscode: > c:\Users\User\test\Lib\site-packages>python -m workon tygu > C:\Users\User\test\Scripts\python.exe: No module

unable to execute 'workon' command

2019-12-11 Thread rishabh roy
I am unable get into a virtualenv in vscode: c:\Users\User\test\Lib\site-packages>python -m workon tygu C:\Users\User\test\Scripts\python.exe: No module named workon.__main__; 'workon' is a package and cannot be directly executed workon is present in c:\Users\User\test\Lib\site-packages tygu is

Re: ''workon' is not recognized as an internal or external command, operable program or batch file'

2019-12-11 Thread rishabh roy
hey hima i got the same error and installed workon package pip but now it still gives error : (test) c:\Users\User\test\Lib\site-packages>python -m workon test C:\Users\User\test\Scripts\python.exe: No module named workon.__main__; 'workon' is a package and cannot be directly executed -- You re

Re: Django model form is not getting saved in Postgresql database

2019-06-03 Thread Ankhi Roy
thanks for your time. Thanks On Mon, Jun 3, 2019, 4:38 PM Ankhi Roy wrote: > Hi, > > I am using Django admin - 2.2.1 and Postgresql as my database. So my > problem is I have saved the user entered data in form.py on "POST" Request > but it isn't saving in the pos

Re: How to migrate MySQL -> PostgreSQL?

2019-06-03 Thread Ankhi Roy
Hey Victor, Do you mean to use postgresql instead of mysql, if so please change database settings in settings.py. However, I am not sure how will you migrate your existing mysql tables and contents to postgresql. Just a workaround you can recreate tables in postgresql and re add the data. There

Django model form is not getting saved in Postgresql database

2019-06-03 Thread Ankhi Roy
Hi, I am using Django admin - 2.2.1 and Postgresql as my database. So my problem is I have saved the user entered data in form.py on "POST" Request but it isn't saving in the postgresql database. Model.py - class modelForm(models.Model): CHOICES = [('Y', 'Yes'), ('N', 'No'

Collectstable displays 0 static file copied issue

2019-06-01 Thread Ankhi Roy
Hey, So I have made the following changes and Django can now read static CSS file now there is no more 404 while loading the static css file. However, on the web browser, the output does not reflect css properties like header color or header alignment. I have run python3 manage.py collectstat

Re: GraphQL and Django integration

2019-04-28 Thread Kaushik Roy
Hi, Please refer to https://github.com/mirumee/saleor project in github, it has integration with React, GraphQL, Apollo/Relay and obviously Django. It is an e-commerce site. you can use it for a reference. https://demo.getsaleor.com/en/ On Sun, 28 Apr 2019 at 07:02, Britto . wrote: > Hi, > > Wha

Showing old data

2019-04-01 Thread Swetank Subham Roy
Hello folks, I have created a hosted a django web app on apache2 using mod_wsgi, the content should automatically refresh everyday. But it is not getting refreshed automatically. I need to manually restart or reload the apache in order to make the changes reflect. I don't want to set cron to restar

Re: Login with email or phone not username

2019-01-06 Thread kaushik kumar roy
and regards Kaushik Kr Roy On Sun, 6 Jan 2019 at 07:39, Achyut Pandey wrote: > [image: Boxbe] <https://www.boxbe.com/overview> This message is eligible > for Automatic Cleanup! (anjan.sarathi...@gmail.com) Add cleanup rule > <https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.b

Re: How to transfer django projects from one pc to another

2018-12-10 Thread Swetank Subham Roy
1. Make requirement file let's say requirement.txt using pip freeze command, which keep records of packages used in the project. 2. Make a copy of project folder to the new machine. 3. Create virtual environment on new machine. 4. Activate and install package from requirement.txt file to the virtua

Re: Error installing mysqldb module !

2018-11-11 Thread Swetank Subham Roy
First of all you have to install 'libmysqlclient' package globally then 'mysqlclient-dev' in project environment On Sun, Nov 11, 2018, 4:42 PM Ansh Srivastava Hey there! I m tryin' to connect mysql database with django, While doin' > it number of errors prompted out as below:- > Error sayin' :(in

RE: Can't install mysqlclient

2018-10-27 Thread Swetank Subham Roy
Yes Linux is best suited OS for developers. You can start getting familiar with Linux by using latest Ubuntu LTS version. Ubuntu provides a better GUI and ease-of-using for beginners. But getting hands-on terminal commands are of great use. -- You received this message because you are subscrib

Re: Can't install mysqlclient

2018-10-26 Thread Swetank Subham Roy
If you are on Linux(debian): You should first install libmysqlclient-dev using command $ sudo apt-get install libmysqlclient-dev Then proceed with installing mysqlclient through pip... For more information you can follow link: https://pypi.org/project/mysqlclient/ On Thu 25 Oct, 2018, 6:59 PM

What would be the best approach to implementing a paywall?

2017-12-12 Thread Roy Shillingburg
Should I simply add a flag on each user model to check if subscribed and restrict access to certain views/apps? A middleware approach? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fr

Re: How to get as result a list of all the users ordered by birthday (month day), ignoring year

2017-11-17 Thread Roy Shillingburg
https://stackoverflow.com/questions/4236226/ordering-a-django-queryset-by-a-datetimes-month-day On Friday, November 17, 2017 at 7:19:43 AM UTC-5, Roberta Takenaka Granero wrote: > > In models: > > birthday = models.DateField() > > def birthday_month_day(self): > # returns month and day >

Django: Importing python modules into static webpage

2017-06-06 Thread ABHIJIT ROY
I am very new to Django. Recently I was developing a site just for getting aquainted with the framework and I came to a point where I needed to import a python module such as request,pytube etc into a static webpage so that i can use their functions . So two questions arose - 1. Is it possib

Re: Where to store simple texts

2016-12-10 Thread Sujit Roy
in your sqlite database u just create a model -- 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, s

Re: Problem with google calendar on ancient django version

2014-12-23 Thread Roy Smith
) 4) No On Dec 22, 2014, at 9:02 PM, Roy Smith wrote: > I'm in the process of incrementally upgrading a site running some ancient > software (django 1.3.1 and django-cms 2.2). I've got a development version > of the site running django-cms 2.3.8 (and still django 1.3.1) for t

Problem with google calendar on ancient django version

2014-12-22 Thread Roy Smith
s version change how this behaves? 3) Is this fixed in later django-cms versions? 4) Is this fundamentally a bug in Google calendar, i.e. I should be reporting it to them? -- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django use

Finding gunicorn worker number inside django app?

2013-11-16 Thread Roy Smith
I'm running django (1.4) with gunicorn (0.17.4) and gevent. I want to have the gunicorn worker number available inside of django, so I can include it in log messages and statsd data for tracking purposes. What I'm doing right now is I put a pre_request hook in my gunicorn config file which fak

Django Insert edit update delete

2013-11-08 Thread Suvankar Roy
Hii All, I am new to django please help me i want to an example project in this funtionality insert ,edit ,update delete data from database Thanks Suvankar -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Get size of cached item?

2013-08-16 Thread Roy Smith
ckling all over again. Is there any way to find out how much memory each object I store is going to use without this extra overhead? --- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

not able to run applets

2013-08-05 Thread Kaushik Roy
hello everyone, i am a new user of django and i am doing a small project for my course. i can show static content like images, css and scripts, but my applets are not running at all. i have a simple hello world applet and its not showing. could anyone throw some light on this? its important for

Atomic test/set/get using django cache API?

2013-05-14 Thread Roy Smith
ted. Is there a way to also get the value, inside the atomic perimeter? -- Roy Smith r...@panix.com -- 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 e

Why does BaseHandler::handle_uncaught_exception() not always log?

2012-10-24 Thread Roy Smith
In core/handlers/base.py, handle_uncaught_exception() does: if settings.DEBUG: from django.views import debug return debug.technical_500_response(request, *exc_info) logger.error('Internal Server Error: %s' % request.path, exc_info=exc_info,

Customizing session id strings?

2012-08-16 Thread Roy Smith
We're using django.contrib.sessions.backends.cache. We use mongodb for our datastore, so we don't use the django model/database support at all. The standard django session machinery generates 32-character hex strings (128 bits) for session ids. We store the session_id in many places in our da

Admin actions -- short_description as doc string?

2012-07-04 Thread Roy Smith
I'm just staring to explore admin actions. I'm surprised to see that you have to set the description by doing: my_action_function.short_description = "blah" wouldn't it be cleaner to just declare a doc string for the action function and have short_description grabbed

Monitoring cache usage?

2012-06-20 Thread Roy Smith
What tools exist to monitor django's cache usage? I'd like to see things like number of keys stored, total amount of memory used, hit rates broken down by key prefix, that sort of thing. We're using django.core.cache.backends.memcached.MemcachedCache. --- Roy Smith r...@pan

editable option for model field?

2012-06-04 Thread Roy Smith
False, my field it omitted entirely from the admin. What's the intent of editable? Is this a bug, or is the description in the docs just misleading? -- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django users" g

Tools for extending the admin?

2012-05-01 Thread Roy Smith
I'm working on a site which makes extensive use of admin, and we're starting to look at extending/customizing it. I am aware of django-admin-tools and django-grappelli. Are there other projects I should be looking at for admin extension/customization ideas? -- You received this message becau

Re: Edit-once object in admin?

2012-04-28 Thread Roy Smith
On Saturday, April 28, 2012 10:35:40 AM UTC-4, Shawn Milochik wrote: > > Override the save() method to raise an exception if "self.id is not > None." > But, that still doesn't tell the admin interface to *show* the fields as read-only (which is really what I'm interested in). If I raise an

Edit-once object in admin?

2012-04-28 Thread Roy Smith
I've got a model that looks something like this: class Image(Model): name = CharField(max_length=40) class ImageVersion(Model): image = ForeignKey(Image) upload_date = DateTimeField(auto_now_add=True) data = ImageField(upload_to="images/learncms") I want all the data in an ImageV

Re: Overriding an admin widget?

2012-04-25 Thread Roy Smith
Oh, I see what's going on. I marked the field as readonly. Apparently the widget only gets created if the field is editable (I guess that makes sense). On Apr 25, 2012, at 1:28 PM, Roy Smith wrote: > Ooops, forgot to mention, I'm using django 1.4. > > > On Apr 25,

Re: Overriding an admin widget?

2012-04-25 Thread Roy Smith
Ooops, forgot to mention, I'm using django 1.4. On Apr 25, 2012, at 12:51 PM, Roy Smith wrote: > I'm trying to get the admin to give me a thumbnail for an ImageForm. > Following the suggestion at http://djangosnippets.org/snippets/1580/, I've > got the following code:

Overriding an admin widget?

2012-04-25 Thread Roy Smith
ionAdmin) The problem is, I'm still getting the standard admin display. I stuck the "assert 0" in AdminImageWidget.__init__() just to prove that it's never being called. What magic am I missing? My model looks like: class ImageVersion(Model): image = ForeignKey(Image)

Adding context data to a TemplateView?

2012-04-22 Thread Roy Smith
ut that just raises: "TemplateView() received an invalid keyword 'extra_context'". What am I missing here? -- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

AutoFields must have primary_key=True?

2012-04-16 Thread Roy Smith
> serial = AutoField() I get an error when I do syncdb or schemamigration: > AssertionError: AutoFields must have primary_key=True. Is this a bug? --- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Building composite keys?

2012-04-16 Thread Roy Smith
I've got a model in django 1.4: class Image(Model): serial = AutoField(primary_key=True) version = IntegerField(default=1) I want (serial, version) to be unique. Is there a way to express that in the model layer? --- Roy Smith r...@panix.com -- You received this message becaus

Migrating a database from Django 1.1/postgress to 1.3/MySQL

2012-04-10 Thread Roy Smith
ort the data with $ python manage.py loaddata materia-dump.2012-04-06.json But I get complaints about duplicate keys: > Problem installing fixture '/home/roy/materia-dump.2012-04-06.json': > Traceback (most recent call last): > File > "/usr/lib/pymodules/p

Re: How to install django-mce?

2012-04-09 Thread Roy Smith
On Sunday, April 8, 2012 4:34:26 PM UTC-4, Roy Smith wrote: > > I'm trying to install django-tinymce 1.5.1b2 into a django-1.3 site. The > installation instructions say: > > "Copy the jscripts/tiny_mce directory from the TinyMCE distribution into > a directory name

Re: How to install django-mce?

2012-04-09 Thread Roy Smith
> > docs are little out of date but should work. > http://django-tinymce.readthedocs.org/en/latest/installation.html > Thanks for the help. The critical item was, "If you are using django-staticfiles you can skip this step". I added 'tinymce' to INSTALLED_APPS, set TINYMCE_DEFAULT_CONFIG = {

How to install django-mce?

2012-04-08 Thread Roy Smith
I'm trying to install django-tinymce 1.5.1b2 into a django-1.3 site. The installation instructions say: "Copy the jscripts/tiny_mce directory from the TinyMCE distribution into a directory named js in your media root. You can override the location in your settings (see below)." But there is n

Re: django registration

2012-03-05 Thread roy moss
Pinax is an open-source platform built on the Django Web Framework . By integrating numerous reusable Django apps and providing starter projects and infrastructure tools, Pinax takes care of the things that many sites have in common so you can focus on what makes your si

Why does django default to Chicago time?

2012-02-15 Thread Roy Smith
In the default settings.py file, the timezone is set to: TIME_ZONE = 'America/Chicago' Why? Wouldn't None (to match the server's time zone) be a more sane default? Even setting it to UTC would be more reasonable than setting it to any specific timezone, but surely going with the system defaul

ListField Implementation

2011-12-18 Thread Roy McElmurry IV
One thing I found very useful for myself was building a ListField and ListInput widget that built lists of forms. This widget comes with a button to dynamically generate new elements to the list. The code I wrote uses only built-in packages and existing django code. I think this could a very popula

Template Renderer safe if used with URL parameters?

2011-12-08 Thread Matthew Roy
I'm presently using a URL parameter to allow requests to specify a particular template they want the results to be returned in, allowing AJAX requests to get results in a particular format for inclusion in different pages without any code duplication. Is this actually safe? Is the input taken by r

STATIC_ROOT confusion

2011-10-07 Thread Roy Smith
I'm mystified why django (under runserver) is not finding my static files. I'm running django-1.3.1. The relevant parts of my settings.py file are: STATIC_ROOT = os.path.join(PROJECT_DIR, 'static') STATIC_URL = '/static/' I have a file in my static directory, a file named foo. If I do a GET on

Re: Help me understand the django.request logger

2011-09-22 Thread Roy Smith
Ugh, I got it figured out. I totally misunderstood what the docs were saying. I was thinking that somehow the django.request logger magically found the request object and stuck it into the context. That's not what it was saying at all. All the quote from the docs really means is that all the pla

Help me understand the django.request logger

2011-09-22 Thread Roy Smith
93.7554641, 'exc_info': None, 'exc_text': None, 'filename': 'views.py', 'funcName': 'listen_content', 'levelname': 'DEBUG', 'levelno': 10, 'lineno': 253, 'message': u"slug = 'esse

Mongo prints traceback directly to stderr?

2011-08-29 Thread Roy Smith
We've got an application which does lots of AJAX calls and sometimes (intentionally) abandons the TCP connection before getting a response. These result in django dumping a stack trace to stderr (see example below). The question is, why does this get written directly to stderr? It happens in Ser

Re: HttpResponseRedirect adds hostname?

2011-08-23 Thread Roy Smith
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. > For more options, visit this group at > http://groups.google.com/grou

HttpResponseRedirect adds hostname?

2011-08-23 Thread Roy Smith
n port 80 (which is the wrong place; the nginx config would route to the django side). It seems like a django bug that the string I pass HttpResponseRedirect is modified before generating the location header. What do you guys think? --- Roy Smith r...@panix.com -- You received this message

HttpRequest.META['SERVER_PORT'] is a string?

2011-08-02 Thread Roy Smith
I'm running django 1.3. If I access HttpRequest.META['SERVER_PORT'], I get back a string (i.e. "80"). I was expecting an integer. Is this a bug (in which case I'll open a ticket to fix it) or it it intentional that it's returning a string (in which case I'll open a ticket to document it better).

Unique usernames for Users?

2011-06-18 Thread Roy Smith
I assume that User.username is constrained to be unique, but I don't actually see that stated anywhere. Is it? And, assuming it is, what happens when you call create_user() with a username that's already taken? Is all this documented somewhere and I'm just not finding it? -- You received this

MongoDB with django?

2011-06-16 Thread Roy Smith
I'm exploring packages to use MongoDB with django. So far, I've found: * DjanMon (https://github.com/mdirolf/djanMon/) * Mongoengine (http://mongoengine.org) * MongoKIT * Mango * Pymongo-bongo * Mongodb-engine (https://github.com/django-mongodb-engine/mongodb- engine) * Django-nonrel (http://www.

Re: How to catch and log exceptions?

2011-06-14 Thread Roy Smith
Exactly what I was looking for. Thanks! -- 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

How to catch and log exceptions?

2011-06-14 Thread Roy Smith
I want to catch any exceptions thrown in my views (or anywhere else, I suppose) and log a full stack trace. I know I can write middleware which implements process_exception(), but that just gets me the naked exception object, not a full stack dump. I'm assuming that by the time my process_excepti

Passing cookies around?

2011-06-09 Thread Roy Smith
We're using django as a front end to a pre-existing web site implemented in PHP. The PHP code has a vaguely RESTful interface, where you can make HTTP calls on it and get back JSON-ized data. The django layer sits in front of that and talks directly to the browser. We're not using any models in d

Accessing template name inside a template?

2011-06-06 Thread Roy Smith
For diagnostic purposes, I want every one of my templates to emit an HTML comment showing the template name. I was doing fine just dropping "", etc, in each template, until the first time I renamed a template and forgot to update the comment :-) Any way to automate this process so I can do ""? -

Re: Confused about uploading files (Cannot force both insert and updating in model saving)

2011-06-06 Thread Roy Smith
> >    if form.is_valid(): > >             f = request.FILES['file'] > >             data_set = DataSet() > >             data_set.save('foo', f) > > I suspect this is the problem: you create an empty instnce of DataSet > and then call its save method. model.save has three optional arguments > [1]

Confused about uploading files (Cannot force both insert and updating in model saving)

2011-06-05 Thread Roy Smith
re', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/Use

No style sheets with DEBUG = False?

2011-05-30 Thread Roy Smith
If I set: DEBUG = False in my settings.py file, my site runs and produces the correct HTML, but there's no style sheets loaded. Even stranger, if I save the HTML generated each way into files and compare them, they're identical! Any clue what might be causing the style sheets not to load with D

Re: authentication not working using test client

2011-04-26 Thread Roy Smith
N_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'socialregistration.auth.FacebookAuth', ) On Apr 26, 2011, at 12:56 PM, Roy Smith wrote: > I've got a test case that essentially looks like this: > >

authentication not working using test client

2011-04-26 Thread Roy Smith
I've got a test case that essentially looks like this: -- from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User class ApiTest(TestCase): def test_login(

Re: Rendering a template from inside a templatetag? (never mind)

2011-04-07 Thread Roy Smith
Do-oh! All I needed to do was t = template.loader.get_template('collage/item-component.html') return t.render(context) On Apr 7, 2011, at 11:14 PM, Roy Smith wrote: > You can't call render_to_response() from inside a tag. Or can you? -- Roy Sm

Rendering a template from inside a templatetag?

2011-04-07 Thread Roy Smith
register.tag('item_html', do_item_html) -- Roy Smith r...@panix.com -- 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@googlegroup

Re: unique identifier to distinguish an instance

2011-04-06 Thread Roy Smith
On Wed, 2011-04-06 at 15:13 -0700, Tony wrote: > so I have two models, A and B. B has a foreignkey relationship in it > from A (To be clear because I know I dont explain it that well, one A > has many Bs). for each group of Bs each A is connected with, I want > there to be a way to mark one of th

Re: Rendering read-only forms?

2011-04-06 Thread Roy Smith
On Wed, 2011-04-06 at 12:51 -0700, Mike Ramirez wrote: > the form widgets accept a key word arguement of "attrs"[1] which takes a > dictionary that has the key as the option and the value is the options fale. > i.e.: attrs={'readonly': 'true'}. These are added to the field when it's > rendered

Rendering read-only forms?

2011-04-06 Thread Roy Smith
I want to display an object in exactly the same style as an existing template that looks like this: {% csrf_token %} {{form}} except that I want all the fields to be read-only. It's easy enough to not include the submit button, but I also want to add readonly="true" attributes to all the t

form.errors is not a dictionary?

2011-04-05 Thread Roy Smith
I'm using django-1.3 . I have a view with the following code: def item_create(request): if request.method == 'POST': form = ItemForm(request.POST) if form.is_valid(): url = form.cleaned_data['url'] item.save() return HttpResponseRedirect('/'

Re: Johnny Cache on Django 1.3

2011-04-04 Thread Roy Smith
Weird choice of name for this project. Should have been "djohnny-cache" :-) On Mon, 2011-04-04 at 13:13 -0700, Charlie Offenbacher wrote: > I read the docs (and the issues in their bug tracker), but my > impression was that the main incompatibility with Django 1.3 is > transactions, which we're

Re: Confusion with ROOT_URLCONF

2011-04-03 Thread Roy Smith
On Apr 3, 4:58 pm, Shawn Milochik wrote: > In short, it has to be on your PYTHONPATH or in the local directory. OK, then I'm still not getting how this works. The full path to my setting and urls files are: /Users/roy/s7/soco/soco-site/settings.py /Users/roy/s7/soco/soco-site/urls.

Re: Confusion with ROOT_URLCONF

2011-04-03 Thread Roy Smith
On Apr 3, 2:55 pm, andy wrote: > Well I'm guess you don't have to. Both ROOT_URLCONF = "foo.urls" and > ROOT_URLCONF = "urls" seem to work fine. Interesting, I just tried it that way, and sure enough it does work. I had simply been following the examples in the tutorial, which showed the foo.urls

Confusion with ROOT_URLCONF

2011-04-03 Thread Roy Smith
I don't understand how ROOT_URLCONF is declared in settings.py. If I put all my apps (and my settings.py file) in a directory "foo", I'm supposed to do: ROOT_URLCONF = "foo.urls" This seems counter-intuitive to me. When I run my app (by running "python manage.py runserver"), I'm already in the

Re: Re: Multiple Servers and Authentication Sessions Breaking

2011-03-09 Thread Matthew Roy
@Tom: I'm not configuring SESSION_ENGINE so it should be the default django.contrib.sessions.backends.db @Henrik: That may well be the problem, I have a cron job to generate a random secret key on each server weekly. I will try setting them statically. Thanks for your responses, I'll let you know

Multiple Servers and Authentication Sessions Breaking

2011-03-09 Thread Matthew Roy
I'm running a site with 2 front end servers (lighttpd with django in fcgi daemons) and one database server (MySQL). The two front end servers are in DNS round-robin so a user might get some content from one and some from the other in any given session. All this works fine and has had no problems fo

  1   2   >