Index of an item in a QuerySet

2006-10-31 Thread samuel
Hi all, I'm probably just not seeing it, but how do I go about getting the index of an item in a query set? I.E., this article is the Xth article in this queryset of articles sorted by date. Thanks, Sam --~--~-~--~~~---~--~~ You received this message because yo

Re: Index of an item in a QuerySet

2006-10-31 Thread samuel
> > I'm probably just not seeing it, but how do I go about getting the > > index of an item in a query set? I.E., this article is the Xth article > > in this queryset of articles sorted by date. > > If you're looping through them in the template with the 'for' tag, > each time through the loop yo

validation inline

2008-09-10 Thread Samuel Mathieson
Hello, I am trying to get some sort of validation inline for the admin: class InlineForm(forms.ModelForm): class Meta: model = Inline def clean(self): if ... raise forms.ValidationError('Error message here.') return self.cleaned_data class StuffInline(

Relation not found error while dealing with foreign keys and forms

2011-11-02 Thread Tabitha Samuel
p me with this issue as I haven't been able to find much help anywhere else on the web (and I've been looking into this for about a week now!) Please let me know if you need any more information. Thanks!! Tabitha Samuel -- You received this message because you are subscribed to the Google G

Re: Relation not found error while dealing with foreign keys and forms

2011-11-02 Thread Tabitha Samuel
quot;."preferred_name", "n_test_staff"."deleted", "n_test_staff"."viewable" FROM "n_test_staff" WHERE "n_test_staff"."username" = tsamuel ' Looks like from the query, is not looking into the n_nics_groups table. Qu

Re: Relation not found error while dealing with foreign keys and forms

2011-11-03 Thread Tabitha Samuel
s import NICSGroupType, Staff > >>> i = Staff.objects.get(username='tsamuel') > >>> i.nics_group.n_group_name > >>> u'TestGroup1' > > Is this operational for your instance? If not, I would double check that > the n_nics_groups table de

Re: Relation not found error while dealing with foreign keys and forms

2011-11-04 Thread Tabitha Samuel
m lies, since we can > get details from the model and view elsewhere. > > Thanks, > > Furbee > > On Thu, Nov 3, 2011 at 7:22 PM, Tabitha Samuel > wrote: > > > > > > > > > K, so that worked... > > > This is what I got: > > In [5]: i = Staf

Re: Relation not found error while dealing with foreign keys and forms

2011-11-04 Thread Tabitha Samuel
Form? That is the object being > instantiated and then causing the error. If there is no nics group > reference field in the StaffForm object, it may raise this error. Also, do > you have this running in a view/template? Do you have a real page that > you've tried this on, or have you

Re: Relation not found error while dealing with foreign keys and forms

2011-11-04 Thread Tabitha Samuel
ute 44. return self.cursor.execute(query, args) Exception Type: DatabaseError at /staff/staffinfo Exception Value: relation "n_nics_groups" does not exist Tabitha On Nov 4, 11:31 am, Furbee wrote: > Oh no, that would not be a good thing to share! :

Re: Relation not found error while dealing with foreign keys and forms

2011-11-04 Thread Tabitha Samuel
.n_group_name > FROM n_test_staff s LEFT JOIN n_nics_groups g ON(g.n_group_number = > s.nics_group) WHERE s.username = 'tsamuel')) > > If that throws an error, we may have a problem in the DB layer. > > Thanks, > > Furbee > > On Fri, Nov 4, 2011 at 10:29

Re: Relation not found error while dealing with foreign keys and forms

2011-11-04 Thread Tabitha Samuel
_name > FROM n_test_staff s LEFT JOIN n_nics_groups g ON(g.n_group_number = > s.nics_group) WHERE s.username = 'tsamuel')) > > If that throws an error, we may have a problem in the DB layer. > > Thanks, > > Furbee > > On Fri, Nov 4, 2011 at 10:29 AM, Tabitha Samuel

Re: Relation not found error while dealing with foreign keys and forms

2011-11-04 Thread Tabitha Samuel
model_to_dict(instance, opts.fields, opts.exclude) File "/nics/a/applications/gibbs/python/site-packages_django/django/ forms/models.py" in model_to_dict 110. opts = instance._meta Exception Type: AttributeError at /staff/staffinfo Exception Value: 'RawQuerySet' object has n

Re: Relation not found error while dealing with foreign keys and forms

2011-11-04 Thread Tabitha Samuel
to proceed from here. I may just have to remove the foreign key reference for the time being and update it manually in the code, until a fix can be found for this. Tabitha On Nov 4, 3:19 pm, Tabitha Samuel wrote: > I found this patch for the raw function (https:// > code.djangoproject.com/at

Re: Relation not found error while dealing with foreign keys and forms

2011-11-06 Thread Tabitha Samuel
ot;, line > > 533, in render_options > >     for option_value, option_label in chain(self.choices, choices): > >   File "/usr/lib/python2.5/site-packages/django/forms/models.py", line > > 882, in __iter__ > >     for obj in self.queryset.all(): > >   File

Editors of choice

2009-09-07 Thread Samuel Hopkins
st to ask the community what editor(s) they preferred to use with Django. Thanks! -- Samuel Hopkins --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Newbie: How to use object related to dropdown selection in django/javascript spaguetti code?

2009-09-13 Thread Samuel Lerning
Hello, I'm a newbie struggling with a simple problem for some time now. I know it is a simple problem and it is a shame that I don't know how to solve it. I have a django spaguetti code that, instead of using forms, uses javascript functions to get a selection from a selection list (). Since I

Re: Newbie: How to use object related to dropdown selection in django/javascript spaguetti code?

2009-09-14 Thread Samuel Lerning
{'title' : title, 'show_filter_foos': True, }, context_instance=RequestContext(request)) Well, I'll be working to understand and fix this. However, if anyone have some sugestions... I'll be ha

Re: Newbie: How to use object related to dropdown selection in django/javascript spaguetti code?

2009-09-14 Thread Samuel Lerning
Hi again, Some progress here, but a minor problem remaining. On selecting a foo, the page is re-rendered with the correct data related to the selected foo. However, the selection list (dropdown) always shows the name of the first foo, instead of showing the name of the selected foo. And I need i

Re: Django Dev server doesn't reflect changes

2010-07-30 Thread Samuel Baldwin
Try clearing any server or browser caches first. -- Samuel Baldwin - logik.li -- 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 this group, sen

Auto-truncated fields at max_length

2010-08-04 Thread Samuel Clay
I have a field that has a max_length set. When I save a model instance, and the field's value is > than max_length, Django enforces that max_length at the database level. (See Django docs on models: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.CharField.max_length) H

Re: is there any certification for Django developers?

2010-09-27 Thread Samuel Baldwin
2010/9/27 nyambaa : > Is there any certification for Django developers? Experience. -- Samuel Baldwin - logik.li -- 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...@googleg

Re: DjangoCon 2011

2010-09-27 Thread Samuel Baldwin
2010/9/27 Franklin Einspruch : > May I humbly suggest Boston? Another for Boston. -- Samuel Baldwin - logik.li -- 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. T

Weird Django Artifact Error

2011-01-30 Thread Samuel Baldwin
the subsequently affected lines, but I still get the error. Here's the traceback: http://dpaste.com/369991/ I'm totally stumped why it would do this and what I'm supposed to do to fix it. -- Samuel Baldwin - logik.li -- You received this message because you are subscribed to the Goog

Re: Weird Django Artifact Error

2011-01-31 Thread Samuel Baldwin
I cloned the repository, deleted the version I was working with and then replaced that with the cloned version. Seems to be working. -- Samuel Baldwin - logik.li -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: VERY cheap django hosting?

2011-06-10 Thread Samuel Fuentes
I use djangoeurope.com which is a rebranding of djangohosting.ch with slightly different prices, I think. Quite happy with the service. On Jun 9, 12:52 am, Alasdair Nicol wrote: > I have used djangohosting.ch before and recommend them. As BR says it's > very easy to deploy, and I thought their su

ANN: Releasing Django Media Tree, a media file management application for the Django admin

2012-01-18 Thread Samuel Luescher
Today I am publicly releasing Django Media Tree, a state of the art media file management application for the Django admin. Django Media Tree is a Django app for managing your website’s media files in a folder tree, and using them in your own applications. It has been in the works for over two

Re: ANN: Releasing Django Media Tree, a media file management application for the Django admin

2012-01-20 Thread Samuel Luescher
I'm not planning to create Fein CMS plugins myself, but I'm very much hoping the community will take a stab at this. Actually, now that I think of it, the actual output generated by the CMS plugins should be abstracted from the CMS and moved to the media_tree.contrib.widgets package so that peop

Error with creating mysite first django tutorial

2012-01-27 Thread samuel muiruri
I'm having a problem with the procedure stated on making you're first project... I'm not sure how exactly it should work since python syntax can't work with the dashes and command prompt of window wouldn't i need to navigate to the folder where the admin file is? I'm good with python I'm just stuck

Re: ANN: Releasing Django Media Tree, a media file management application for the Django admin

2012-01-27 Thread Samuel Luescher
/docs/django-media-tree/en/latest/custom_plugins.html http://readthedocs.org/docs/django-media-tree/en/latest/bundled_plugins.html http://readthedocs.org/docs/django-media-tree/en/latest/views.html Sam On 20 January 2012 15:34, Samuel Luescher wrote: > I'm not planning to create Fei

Working with List in Tweepy

2012-03-30 Thread samuel ayo
Hello, how can I make users create their list in my django app automatically? Since the API.create_list() required parameters before it would work; * Creates a new list for the authenticated user. Accounts are limited to 20 lists. Parameters: name (Required), mode (public/private default: p

Loading a page (with external authentication) changes the session_key

2013-04-11 Thread Samuel Bancal
ango 1.4) : DEBUG 2013-04-09 09:11:21,899 views home None DEBUG 2013-04-09 09:11:41,261 views auth f16ab3e574b866177803f9011dc33ab8 DEBUG 2013-04-09 09:11:41,375 views home f16ab3e574b866177803f9011dc33ab8 Is this change of behavior expected? (new feature?) How could we fix it? Thanks! Samuel -- Yo

makemigrations complains about a ForeignKey not being Unique

2015-01-21 Thread Samuel Jean
Hi there, Does anybody know of a way to trick Django 1.7 (or the proper way, if any) to modify the property of an inherited field so that it has unique property on the children only. Consider this abstract model : class UniqueObjectModel(models.Model): uuid = models.CharField(max_length=

Django 1.8 ArrayField append & extend

2015-03-26 Thread Samuel Colvin
Please forgive me for cross posting, I asked this question on stack overflow 2 weeks and have "earnt the tumbleweed award for no one commenting or replying to it" (no really, it's a real thing). Django 1.8 will come with new advanced field types including ArrayField

Same PTR behavior in multiple inheritance

2013-11-23 Thread Samuel Chávez
Hi guys, I have some issue with model multi inheritance in Django's ORM. I'm trying to create a ChildModel(ParentModelA, ParentModelB). When I create a ChildModel register, Django's ORM creates backstage both ParentModelA and ParentModelB registers. The odd thing is that both parent registers g

GeoDjango

2017-03-18 Thread Samuel Brunel
Hello, I’m new on GeoDjango, I need to known If I can use GeoDjango as WMS ? Best regards, Samuel -- 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

Re: GeoDjango

2017-03-18 Thread Samuel Brunel
new on GeoDjango, I need to known If I can use GeoDjango as WMS ? > > Best regards, > > Samuel > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group

Re: add a secretballot middleware to MIDDLEWARE_CLASSES

2017-04-07 Thread Samuel Brunel
Hi, MIDDLEWARE is in settings.py of your project. Sam Le ven. 7 avr. 2017 23:29, shahab emami a écrit : > tanks > but my problem is: > I don't know where middleware section is. > i looked for middleware section in the app but i couldn't find anything. > that's why i asked that question here >

Re: add a secretballot middleware to MIDDLEWARE_CLASSES

2017-04-08 Thread Samuel Brunel
Sorry. I think i'ts in "tokens and SecretBallotMiddleware" Have à look to http://www.pygarden.com/pkg/django-likes, http://stackoverflow.com/questions/1954/django-likes-setup-and-error, http://stackoverflow.com/questions/16179080/django-django-secretballot-middleware Le ven. 7 avr. 2017 23:2

permission denied for relation gallery_image

2017-07-19 Thread Samuel Muiruri
I try this command from the shell from gallery.models import Image I get back ProgrammingError: permission denied for relation gallery_image -- Best Regards, Samuel Muiruri. Web Designer | +254 738 940064 -- You received this message because you are subscribed to the Google Groups &q

Re: Page Not Found

2017-07-27 Thread Samuel Brunel
Hi, Use http://localhost:8000/polls/ to view your page. First urls.py is project file : mysite/mysite/urls.py > urlpatterns = [ > url(r'^polls/', include('polls.urls')), > url(r'^admin/', admin.site.urls), > ] Django remove "http://localhost:8000/

Re: Avoid primary key in Django models.py

2017-08-04 Thread Samuel Dorsaz
if you remove your primary key, you will not be able to identify your record in your database, could you please precise what do you want to achieve by doing this ? Le vendredi 4 août 2017 14:07:19 UTC+2, jagadishreddy bommareddy a écrit : > > I am using Django frame work in that models.py in any

Setting up a "update" async with channels

2017-08-28 Thread Samuel Muiruri
very "x" seconds 4. final feedback with result sent and closes connection I've gotten through setting up channels and the starting tutorial, if you can give me an example on this will be appreciated. -- Best Regards, Samuel Muiruri. Web Designer | +254 738 940064 -- You re

Re: Setting up a "update" async with channels

2017-08-28 Thread Samuel Muiruri
rom > inside a consumer, consumers should be nonblocking), for both updates and > when it exits > > Andrew > > On Mon, Aug 28, 2017 at 3:53 AM, Samuel Muiruri > wrote: > >> Hi, >> I want to use django-channels to show progress report of a background >>

django migration error: django.db.utils.ProgrammingError: must be owner of relation account_userprofile

2017-08-28 Thread Samuel Muiruri
getting this error when I'm running migrate, to note this is likely related to the db connection I believe (revampenv) sammy@samuel-pc:~/revamp$ python manage.py migrate Operations to perform: Apply all migrations: account, sessions, admin, auth, thumbnail, contenttypes, gallery Ru

get json sent to channels in view

2017-08-30 Thread Samuel Muiruri
] File "/usr/local/lib/python2.7/dist-packages/channels/message.py", line 36, in __getitem__ return self.content[key] KeyError: 'test' -- Best Regards, Samuel Muiruri. Web Designer | +254 738 940064 -- You received this message because you are subscribed to the Google G

django-channels get the json post on connect

2017-08-31 Thread Samuel Muiruri
I have this in routing.py for django-channels channel_routing = [ # Wire up websocket channels to our consumers: route("websocket.connect", ws_connect), route("websocket.receive", ws_message), ] and the ws_connect looks like this @channel_session def ws_connect(message, key): # Acce

Processing data sent by sockets in django-channels

2017-09-04 Thread Samuel Muiruri
t.send({"test":"data"}); } then I can move to having this trigger a background process so I can send the status and finally the final result via sockets. -- Best Regards, Samuel Muiruri. Web Designer | +254 738 940064 -- You received this message because you

figuring out bug with django cookies: not working on server

2017-10-02 Thread Samuel Muiruri
I have a site that relies on checking if a cookie exists for service_id and if it does checks if you can upload files for service... this works nicely offline but on pushing changes to server it created a bug where even though the cookie can be seen (on the dev console) [image: enter image de

Re: What's the simple way to implement a chat system in Django?

2017-10-02 Thread Samuel Muiruri
You'll end up needing to use sockets to get a "live chat" and channels is one of the quickest way to get there. On Monday, October 2, 2017 at 6:39:48 PM UTC+3, Kishore Srinivas wrote: > > I want to make a chat system in Django, but all those channel stuffs looks > difficult , so are there any o

Re: figuring out bug with django cookies: not working on server

2017-10-02 Thread Samuel Muiruri
ookie('service_id', service_id) return response On Tue, Oct 3, 2017 at 1:05 AM, ADEWALE ADISA wrote: > can you show the code where you set the cookie before retrieving it > On Oct 2, 2017 6:35 PM, "Samuel Muiruri" wrote: > >> I have a site that relies on checking

Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
howed that the raw SQL query with LEFT JOIN is fast enough for production, regardless of what fields and objects are being queried. The craziest query I built took about 20 seconds, which is ok for what we are trying to do. Any other options? -Samuel -- You received this message because you are subsc

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
Thanks, I have seen that and plan to use it, but for this particular feature I need something more tailored. -Samuel On Monday, November 6, 2017 at 8:56:29 PM UTC+1, Matthew Pava wrote: > > Though it doesn’t directly answer your query, you might be interested in > this package:

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
e result does not take into account that the LEFT JOIN multiplies the number of total rows. -Samuel > -- 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

Re: Equivalent of multi-table JOIN (another post on reverse select_related)

2017-11-06 Thread Samuel Abels
in fact return absolutely the right thing: >>> q = Device.objects.filter(pk='localhost', package__name__contains='i', unit__ip__address__contains='1') >>> q.count() 1257 Yeah, that solves the issue. Thanks a lot! -Samuel -- You received this me

Create Read Update Delete Master Data Spread over Multiple Models

2015-07-11 Thread Samuel Bächler
Hi everyone, In the django documentation I found how to create, read, update and delete on a single model (Author) with django (see here ). In my application I want to create, read, update and delete master data of an "employee

Prevent field from becoming null

2015-12-10 Thread Samuel Muiruri
Hello, I want to override the save for the show model so I check for if the value passed for a field is null if so ignore saving for the field class Shows(models.Model): some_field = models.CharField(max_length=128, default="something") def save(self, *args, **kwargs): super(Show

Prevent field from becoming null

2015-12-10 Thread Samuel Muiruri
Hello, I want to override the save for the show model so I check for if the value passed for a field is null if so ignore saving for the field class Shows(models.Model): some_field = models.CharField(max_length=128, default="something") def save(self, *args, **kwargs): super(Show

Re: Issue with regroup and sorting with foreign keys

2007-09-11 Thread Samuel Adam
I have had similar issues while sorting with foreignkeys, try specifying the sort like this : {% regroup techskill.name.all|dictsort:"domain.id" by domain as grouped %} On Sep 11, 11:04 am, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote: > Hello, > > Below my model with which I have an issue : > >

Re: django-voting question

2007-09-12 Thread Samuel Adam
Try this : {% for p in posts %} {{ p.0 }} {{ p.1 }} {% endfor %} :P --~--~-~--~~~---~--~~ 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@googlegro

Re: Arithmetic operations in a templete

2007-09-14 Thread Samuel Adam
no, Scott, you should just do *this*: In your Parrot model, you could add a property that displays your DOM id. class Parrot(models.Model): # fields def _domid(self): return ''parrotButton-%s" % self.id domid = property(_domid) and use parrot.domid in your templates. On 14

Re: media

2007-09-20 Thread Samuel Adam
http://www.djangoproject.com/documentation/static_files/ --~--~-~--~~~---~--~~ 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 t

Re: Adding extra info to HttpResponseRedirect

2007-10-04 Thread Samuel Adam
HttpResponseRedirect doesn't return a template so you just need to add your message before the redirect: request.user.message_set.create(message="Your playlist was added successfully.") You should implement the display of your messages on your base template like this: {% for message in messages %

Re: Django rearranges query strings?

2007-10-24 Thread Samuel Adam
It may have something to do with the CommonMiddleware: http://www.djangoproject.com/documentation/middleware/#django-middleware-common-commonmiddleware It doesn't see the trailing slash on your query : /app? and redirects to /app/? Your redirect is strange, it could be a misuse of a regexp in y

Re: Query on Instant Messaging

2007-10-24 Thread Samuel Adam
http://www.jabber.org/about/overview.shtml On Oct 24, 10:06 am, Subramanyam <[EMAIL PROTECTED]> wrote: > Hi > > Do we have any libraries in django to provide instant messaging or are > there any open source project that we can integrate it into our web > server (Django-server ) and provide instan

Re: Messaging component

2007-11-16 Thread Samuel Adam
I have released my code for a private message system. It's quite powerful, the functions are all displayed in the templates. For example, if you don't want to have message history in the read view, just remove it in the templates. Django is really smart and won't trigger the SQL queries if it do

Re: Custom methods for ManyToManyManager

2007-11-16 Thread Samuel Adam
I've added it, line 228 On Nov 16, 3:32 pm, Samuel Adam <[EMAIL PROTECTED]> wrote: > I've been hacking some filtering for related managers, have a look at > the BoxManager > here:http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py > > My app misses

Re: Custom methods for ManyToManyManager

2007-11-16 Thread Samuel Adam
I've been hacking some filtering for related managers, have a look at the BoxManager here: http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py My app misses the user.inbox.new() feature, i will add it soon. :) On Nov 16, 2:18 pm, "Tomi Pieviläinen" <[EMAIL PROTECTED]> wrote: > Hi gr

Re: design Q: where to put peoples names

2007-11-16 Thread Samuel Adam
Have the "is_active" field of the User model set to False for the users that don't need a login. The auth login will raise an error if an inactive user tries to log in. Always try to use what is there. On Nov 16, 3:02 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: > The user table has first/last n

Re: design Q: where to put peoples names

2007-11-16 Thread Samuel Adam
gt; > anything is possible. > > > I would think at some point it isn't a good idea to use the User table. > > What if > > it was 1,000,000 names, like if I was publishing a phone book? > > > > Basically, if any of those users would ever need to be promoted

Re: Accessing request.user inside a model methods

2007-11-17 Thread Samuel Adam
http://lucumr.pocoo.org/blogarchive/why-i-cant-stand-threadlocal-and-others On Nov 17, 10:20 am, DanB <[EMAIL PROTECTED]> wrote: > Thxs Alex, > > really helpful info. > > Cheers, > DanB > > On Nov 16, 7:04 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > >http://code.djangoproject.com/wiki/CookBo

Re: How to handle differing timezones?

2007-11-18 Thread Samuel Adam
Heres my take: - Handle every time related data in UTC - Record the user TZ in the UserProfile - Display the user time with a |tz:user template filter I don't have snippets right here but i think Jonathan Buchanan has a clean and similar solution on his forum app: http://www.jonathanbuchanan.plu

Re: using "select_related" .Does it works?

2007-11-20 Thread Samuel Adam
The purpose of select_related() is to limit the number of connections to the database server. An analogy would be that if you have a webpage with 4 CSS file inclusions ( >> from pm.models import Message >>> from django.db import connection >>> message = Message.objects.get(pk=1) >>> '%s sent a me

Re: GeoDjango Distances

2007-11-22 Thread Samuel Adam
I don't have answers for you but as you're working with geo data, you might find this library useful: http://exogen.case.edu/projects/geopy/ On Nov 22, 7:15 am, Dan <[EMAIL PROTECTED]> wrote: > Hi > > I started using the Geodjango branch, it seems to be working really > well so far, I have a few

Re: prepopulate_from

2006-05-30 Thread Samuel Wright
Hi All If one uses mysite/article/slug as a url, then duplicate slugs would be a problem. Ok, for most sites mysite/article/month/day/slug fixes the problem, but only up to a point. would you go down the /mysite/article/234/slug route? Any suggestions? Cheers On 26/01/06, Adrian Holovaty <[EMA

Issues with french accents

2018-02-22 Thread Samuel Brunel
"json_str = json.dumps(data, ensure_ascii=False, indent=4)" to get french accents but I've no idea to do this with manage.py. How to get french accents conversion with "./manage.py dumdata ..." ? Regards, Samuel -- You received this message because you are subscribed to

Re: Issues with french accents

2018-02-22 Thread Samuel Brunel
James, Thanks for this explaination. Samuel 2018-02-22 13:04 GMT+01:00 James Bennett : > JSON is a subset of JavaScript's object-literal syntax. > > In JavaScript, as in Python 3, string literals are defined to be Unicode. > JSON is defined as specifically using UTF-8 a

Re: Abridged summary of django-users@googlegroups.com - 37 updates in 18 topics

2018-03-27 Thread Samuel Muiruri
uirements and provide a feedback. > Regards > > On Monday, March 26, 2018 at 12:03:28 AM UTC+5:30, prince gosavi wrote: > ...more > <http://groups.google.com/group/django-users/msg/22f48204b0af3?utm_source=digest&utm_medium=email> > Back to top <#m_-8114719966638835162_di

new Feature: yay or neigh?

2018-04-07 Thread Samuel Muiruri
%} -- Best Regards, Samuel Muiruri. Student in Machine Learning & a veteran web developer. <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free. www.avast.com <https://www.avast.co

Verify Emails

2018-04-07 Thread Samuel Muiruri
*exists and also use it to get back those that don't so you can remove them from your list like dummy emails provided to your subscription page. -- Best Regards, Samuel Muiruri. Student in Machine Learning & a veteran web developer. <https://www.avast.com/sig-email?utm_medium=em

Re: CreateView autoset field

2018-04-14 Thread Samuel Muiruri
on the models for example info = models.CharField(max_length=100, default='West Indiana') -- 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.

Re: registration with cities...

2018-04-14 Thread Samuel Muiruri
Will tell you the possible ways to tackle this. 1. You assign the user model with a city name so when you filter results for a user you also filter to match the city they're in. 2. You use the browser locate feature to get gps info (latitude, longitude) feed that to django through ja

Re: How to handle a migration that last too long for being deployed?

2018-04-14 Thread Samuel Muiruri
Maybe not adequate but you could dump_data from a model and load_data and not have migrate load data also at the same time. -- 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: ImportError: No module named 'main'

2018-04-14 Thread Samuel Muiruri
try this INSTALLED_APPS = [ ... #'DjangoRestfulServer', #remove you don't import the main project 'main', #no need for substanciating an app ] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Re: I'm trying to edit address form for Saleor ecommerce platform

2018-04-14 Thread Samuel Muiruri
"adress_form_lines" you need to follow it to where you get the data from then follow that to wherever the model is, maybe it's instanced somewhere inside the model like class Model(models.Model): ... def __str__(self): return self.company_name anyway likely it's noted where

Re: CreateView autoset field

2018-04-15 Thread Samuel Muiruri
users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/CAFVSD1q7CBvFc8wPfEMRyjad0MOmk > N1e7Ph4GBmY_48xCrFtcA%40mail.gmail.com > <https://groups.google.com/d/msgid/djang

Re: Page not found (404).Please check i am unable to run server.It is showing error

2018-05-26 Thread Samuel Brunel
Hi, mysite.urls: from django.contrib import admin from django.urls import path from django.urls import include urlpatterns = [ path('polls/', include('polls.urls')), # To route to ‘/' path('', admin.site.urls), ] http://127.0.0.1:8000 : Route to admin urls

django use models from outside script

2019-01-05 Thread Samuel Muiruri
I have an external script that I want to have access to django's models primarily because it's an external implementation of sockets which is simple I want to see if this is possible. This is the snippet of code I added below the settings.py file based on an answer on stackoverflow. #Allow

django middleware return response and prevent calling main function

2019-01-07 Thread Samuel Muiruri
I want to use a form of cache using django middleware/context-processors. I do know it's simpler to just add the decorator at the top of the function but for reasons I have to do it this way. Using this as my example of my function def cache_results(request): response = {}

Possible hack attempt

2019-02-01 Thread Samuel Muiruri
O = '/' QUERY_STRING = '' RAW_URI = '/' REMOTE_ADDR = '' REQUEST_METHOD = 'GET' SCRIPT_NAME = '' SERVER_NAME = '/home/sammy/webapp/decomagna/deco.sock' SERVER_PORT = '' SERVER_PROTOCOL = 'HTTP/1.0'

Re: Possible hack attempt

2019-02-01 Thread Samuel Muiruri
I got it handled I just wanted to point out I noticed something bizarre for two reasons: 1. Get devs on alert that this exists (I don't believe my system is compromised) 2. Ensure the community might pick on this if said hacker plans to target django sites. On Fri, Feb 1, 2019 at 3:3

RES: Help me pleace

2020-07-22 Thread Samuel Nogueira
Please, can you send some screenshots of the code related to your question? De: Nikola TeslaEnviado:quarta-feira, 22 de julho de 2020 14:52Para: django-users@googlegroups.comAssunto: Help me pleace Hi, I'm trying to get the sender's email in the headers of my email (I mean my blog's contact form).

RES: RES: Help me pleace

2020-07-23 Thread Samuel Nogueira
Sorry if I took so long.Probably your variable “correo” isn't set up correctly and, instead having another e-mail, your variable is being addressed with your own e-mail De: Nikola TeslaEnviado:quarta-feira, 22 de julho de 2020 17:18Para: django-users@googlegroups.comAssunto: Re: RES: Help me pleace

RES: Havingproblemwithdisplay. Appreciate any help!

2020-07-28 Thread Samuel Nogueira
Your problem with the html is that you probably are accessing via file path, instead try to access via localhostEx: localhost:8000/your-url De: Phan NguyenEnviado:terça-feira, 28 de julho de 2020 08:45Para: Django usersAssunto: Havingproblemwithdisplay. Appreciate any help! I got no idea how to mig

RES: Havingproblemwithdisplay. Appreciate any help!

2020-07-28 Thread Samuel Nogueira
server. And this is what I got(picture attached) -- only the /admin works, the rest like /about, /btn and /blog cannot be found..On Tuesday, July 28, 2020 at 9:30:01 PM UTC+7, Samuel Nogueira wrote:Your problem with the html is that you probably are accessing via file path, instead try to access via

RES: Havingproblemwithdisplay. Appreciate any help!

2020-07-28 Thread Samuel Nogueira
attached) -- only the /admin works, the rest like /about, /btn and /blog cannot be found..On Tuesday, July 28, 2020 at 9:30:01 PM UTC+7, Samuel Nogueira wrote:Your problem with the html is that you probably are accessing via file path, instead try to access via localhostEx: localhost:8000/your-url

Update a template

2020-07-28 Thread Samuel Nogueira
? -Samuel Nogueira Bacelar GitHub: https://github.com/SamuelNoB Linkedin: https://www.linkedin.com/in/samuel-nogueira-87800b1aa

RES: best book for learning django

2020-08-25 Thread Samuel Nogueira
/ -Samuel Nogueira Bacelar GitHub: https://github.com/SamuelNoB Linkedin: https://www.linkedin.com/in/samuel-nogueira-87800b1aa

RES: Deploying my Django project

2020-09-17 Thread Samuel Nogueira
Hi, heroku is a good choice to deploy your Project.  -Samuel Nogueira Bacelar GitHub: https://github.com/SamuelNoB Linkedin: https://www.linkedin.com/in/samuel-nogueira-87800b1aa

Best places to learn Software Engineering

2020-10-06 Thread Samuel Nogueira
se of that I want to learn it by myself, so I would like to know wich materials and sources are the best to learn about Software Engineering disciplines.  -Samuel Nogueira Bacelar GitHub: https://githu

RES: Django learning source

2020-10-06 Thread Samuel Nogueira
. -Samuel Nogueira Bacelar GitHub: https://github.com/SamuelNoB Linkedin: https://www.linkedin.com/in/samuel-nogueira-87800b1aa/ - De: the_masterEnviado:terça-feira, 6

  1   2   >