razisayyed / django-ads Goto Github PK
View Code? Open in Web Editor NEWAds Management System for Django Framework
License: Apache License 2.0
Ads Management System for Django Framework
License: Apache License 2.0
Hello,
Sorry for my english.
I've installed this app, all pages appear but add ads page display a blank page. I use Grappelli to style my admin. Without Grappelli (standard admin), i can use this page.
my specifictions: django 1.10 and Grappelli 2.9.1
best regards
Hi. Please add readme need install package "Django JS Reverse" - https://django-js-reverse.readthedocs.io/en/latest/
because in js file ads.js error undefined var url = Urls['ads:ad-impression']();
"Urls" undefined. ver.1.1.1
Sometimes the X-Forwarded-For
header isn't the one that contains the real user's IP address. For example, if you're behind a CloudFlare proxy, the header you want to use is CF-Connecting-IP
.
It would be useful if this app had a setting that could specify which request.META
key it used; defaulting to HTTP_X_FORWARDED_FOR
as it's set up with now.
Django version 4 is not supported. Had to downgrade to version 3
I have not created render_ad_zones.html and also i have not installed jQuery yet.
What should I do next to achieve the results?
How do I get this logic available to DRF instead of the tradition django way?
def render_ads_zone(context, zone):
# Retrieve random ad for the zone based on weight
ad = Ad.objects.random_ad(zone)
if ad is not None:
request = context['request']
if request.session.session_key:
impression, created = Impression.objects.get_or_create(
ad=ad,
session_id=request.session.session_key,
defaults={
'impression_date': timezone.now(),
'source_ip': get_client_ip(request),
})
context.update({
'ad': ad,
'google_adsense_client': settings.ADS_GOOGLE_ADSENSE_CLIENT,
'zone': settings.ADS_ZONES.get(zone, None)
})
return context
Been trying to solve this issue for some hours without success. I getting an error at Line 7 in ads.js file. The Urls is undefined. What could be the workaround here?
var url = Urls['ads:ad-impression']();
Hi guys
How should I Add Advertisers, Categories, and Ads using the Django admin interface?
'name': gettext('Header'),
NameError: name 'gettext' is not defined
using django 3.2
Oftentimes, anonymous users won't have a session. In that scenario, ads that are shown to them and ads that they click on won't be recorded. Django's SESSION_SAVE_EVERY_REQUEST
setting won't help with this either. The render_ads_zone
template tag and the AdClickView
view both have this line:
if request.session.session_key:
That line could be replaced with something like this:
request.session['django-ads'] = True
request.session.save()
You could also have the app support both behaviors (if you wanted to) with a setting like ADS_SESSION_KEY
. If it's a string, use the behavior I proposed above. If it's None
, use the current behavior. Its default value could be 'django-ads'
.
Thoughts?
it gives me this error when i try to render a zone . {% render_zone 'content' %}
please note that i've loaded the ads tags {% load ads_tags %}
i'm using Django 1.10
Not everyone wants each and every click of an ad to be added to the database. Enabling database tracking for every click introduces spam clicking issues where a person or a bot could spam click an ad over and over again and fill up the database rapidly with excessive data.
Plus the ad networks should already track that data. There is no need to store it in the database.
Some people might prefer only tracking certain database columns about a click and not every single proposed database column. Add some customization as to what columns in the database the user desires to be tracked also.
Since IP address is tracked by default, that is not necessarily a good thing from a legal standpoint as PII and GDPR privacy laws come into play. The IP address should be encrypted to prevent this or have an option to be disabled.
Hi guys,
I am new to django ads. I have created a project called mysite and inside that project I have created an app called advertisements.
See the link below.
In my template, the link is working fine. However, the image is not loaded.
The console says Not Found: /advertisement/iphone.jpeg
Can anyone help me?
@razisayyed @ataylor32 Is possible use this package for work without Google AdSense?, I added some Advertisers, Categories, and Ads using Django admin interface but I can see the ads in my custom templates because the {% load ads_tags %}
tag require Google AdSense for use it.
Currently, we need to define the sizes of an image in the settings and then upload images that adhere to these dimensions. This means, we need to generate and upload several different files. Instead, wouldn't it be better to upload one image only and then auto generate all the sizes from the settings? Then I only need to take care of the aspect ratio of the image (1:1, 1:2, etc.) and the rest is automated.
What do you think? I can contribute if you like, I would like to heavily use this plugin for several clients of mine with multiple Django Websites.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.